Vishwanatha | 81ee91f | 2016-08-30 17:17:13 +0530 | [diff] [blame] | 1 | #include <systemd/sd-bus.h> |
| 2 | #include "time-register.hpp" |
| 3 | #include <sys/timerfd.h> |
| 4 | #include <errno.h> |
| 5 | #include <stdio.h> |
| 6 | |
| 7 | /* Function pointer of APIs exposed via Dbus */ |
| 8 | //const sd_bus_vtable timeServicesVtable[] = |
| 9 | const sd_bus_vtable timeServicesVtable [] = |
| 10 | { |
| 11 | SD_BUS_VTABLE_START(0), |
| 12 | SD_BUS_PROPERTY("curr_time_mode", "s", getCurrTimeModeProperty, 0, |
| 13 | SD_BUS_VTABLE_PROPERTY_CONST), |
| 14 | SD_BUS_PROPERTY("curr_time_owner", "s", getCurrTimeOwnerProperty, 0, |
| 15 | SD_BUS_VTABLE_PROPERTY_CONST), |
| 16 | SD_BUS_PROPERTY("requested_time_mode", "s", getReqTimeModeProperty, 0, |
| 17 | SD_BUS_VTABLE_PROPERTY_CONST), |
| 18 | SD_BUS_PROPERTY("requested_time_owner", "s", getReqTimeOwnerProperty, 0, |
| 19 | SD_BUS_VTABLE_PROPERTY_CONST), |
| 20 | SD_BUS_METHOD("GetTime", "s", "sx", &GetTime, |
| 21 | SD_BUS_VTABLE_UNPRIVILEGED), |
| 22 | SD_BUS_METHOD("SetTime", "ss", "i", &SetTime, |
| 23 | SD_BUS_VTABLE_UNPRIVILEGED), |
| 24 | SD_BUS_VTABLE_END, |
| 25 | }; |