blob: cdc1dd2760d7021861cda6d3e596583aff5c21ac [file] [log] [blame]
Vishwanatha81ee91f2016-08-30 17:17:13 +05301#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[] =
9const 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};