| #ifndef __MMP_ONKEY__ |
| #define __MMP_ONKEY__ |
| |
| #include <stdio.h> |
| #include<stdlib.h> |
| #include<string.h> |
| #include <unistd.h> |
| #include <sys/types.h> |
| #include <sys/select.h> |
| #include <errno.h> |
| #include <sys/stat.h> |
| #include <fcntl.h> |
| #include <sys/socket.h> |
| #include <arpa/inet.h> |
| #include <libubus.h> |
| #include <libubox/blob.h> |
| #include <libubox/usock.h> |
| #include <uci.h> |
| #include <cutils/properties.h> |
| #include <ril.h> |
| #include <rilutil.h> |
| #include <time.h> |
| |
| #define RildName "ril" |
| |
| enum { |
| ONKEY_CALL, |
| __ONKEY_MAX |
| }; |
| |
| #define RIL_MAX_RETRIES 20 |
| |
| static const struct blobmsg_policy onkey_policy[] = { |
| [ONKEY_CALL] = { .name = "onkey", .type = BLOBMSG_TYPE_INT32 }, |
| }; |
| |
| int onkey_method(struct ubus_context *ctx, struct ubus_object *obj, |
| struct ubus_request_data *req, const char *method, |
| struct blob_attr *msg); |
| void complete_radio_power_async_cb(struct ubus_request *req, int ret); |
| int onkey_init(struct ubus_context *ctx); |
| void poweroff_system(int sec); |
| |
| #endif |