summaryrefslogtreecommitdiffstats
path: root/time-register.c
blob: cdc1dd2760d7021861cda6d3e596583aff5c21ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <systemd/sd-bus.h>
#include "time-register.hpp"
#include <sys/timerfd.h>
#include <errno.h>
#include <stdio.h>

/* Function pointer of APIs exposed via Dbus */
//const sd_bus_vtable timeServicesVtable[] =
const sd_bus_vtable timeServicesVtable [] =
{
    SD_BUS_VTABLE_START(0),
    SD_BUS_PROPERTY("curr_time_mode", "s", getCurrTimeModeProperty, 0,
    SD_BUS_VTABLE_PROPERTY_CONST),
    SD_BUS_PROPERTY("curr_time_owner", "s", getCurrTimeOwnerProperty, 0,
    SD_BUS_VTABLE_PROPERTY_CONST),
    SD_BUS_PROPERTY("requested_time_mode", "s", getReqTimeModeProperty, 0,
    SD_BUS_VTABLE_PROPERTY_CONST),
    SD_BUS_PROPERTY("requested_time_owner", "s", getReqTimeOwnerProperty, 0,
    SD_BUS_VTABLE_PROPERTY_CONST),
    SD_BUS_METHOD("GetTime", "s", "sx", &GetTime,
    SD_BUS_VTABLE_UNPRIVILEGED),
    SD_BUS_METHOD("SetTime", "ss", "i", &SetTime,
    SD_BUS_VTABLE_UNPRIVILEGED),
    SD_BUS_VTABLE_END,
};
OpenPOWER on IntegriCloud