Request ID (skeleton)
[platform/core/connectivity/zigbee-manager.git] / zigbee-daemon / zigbee-lib / include / zblib_driver_mfglib_control.h
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Contact: Suresh Kumar N (suresh.n@samsung.com)
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #ifndef __ZIGBEE_LIB_DRIVER_MFGLIB_CONTROL_H__
20 #define __ZIGBEE_LIB_DRIVER_MFGLIB_CONTROL_H__
21
22 /**< ZigBee 'mfglib control' driver operations */
23 typedef struct {
24         gboolean (*start)(ZigBeeDriver *driver, guint request_id);
25         gboolean (*end)(ZigBeeDriver *driver, guint request_id);
26         gboolean (*start_tone)(ZigBeeDriver *driver, guint request_id);
27         gboolean (*stop_tone)(ZigBeeDriver *driver, guint request_id);
28         gboolean (*start_stream)(ZigBeeDriver *driver, guint request_id);
29         gboolean (*stop_stream)(ZigBeeDriver *driver, guint request_id);
30         gboolean (*send_packet)(ZigBeeDriver *driver, guint request_id);
31         gboolean (*set_channel)(ZigBeeDriver *driver, guint request_id);
32         gboolean (*get_channel)(ZigBeeDriver *driver, guint request_id);
33         gboolean (*set_power)(ZigBeeDriver *driver, guint request_id);
34         gboolean (*get_power)(ZigBeeDriver *driver, guint request_id);
35         gboolean (*set_synoffset)(ZigBeeDriver *driver, guint request_id);
36         gboolean (*get_synoffset)(ZigBeeDriver *driver, guint request_id);
37         gboolean (*rx_start)(ZigBeeDriver *driver, guint request_id);
38         gboolean (*rx_stop)(ZigBeeDriver *driver, guint request_id);
39         gboolean (*rx_verify)(ZigBeeDriver *driver, guint request_id);
40         gboolean (*get_rssi)(ZigBeeDriver *driver, guint request_id);
41 } ZblibDriverMfglibControlOps_t;
42
43 /**< ZigBee 'mfglib control' ops IDs */
44 typedef enum {
45         ZBLIB_MFGLIB_CONTROL_OPS_START = 1, /**< Start */
46         ZBLIB_MFGLIB_CONTROL_OPS_END, /**< End */
47         ZBLIB_MFGLIB_CONTROL_OPS_START_TONE, /**< Start tone */
48         ZBLIB_MFGLIB_CONTROL_OPS_STOP_TONE, /**< Stop tone */
49         ZBLIB_MFGLIB_CONTROL_OPS_START_STREAM, /**< Start stream */
50         ZBLIB_MFGLIB_CONTROL_OPS_STOP_STREAM, /**< Stop stream */
51         ZBLIB_MFGLIB_CONTROL_OPS_SEND_PACKET, /**< Send packet */
52         ZBLIB_MFGLIB_CONTROL_OPS_SET_CHANNEL, /**< Set channel */
53         ZBLIB_MFGLIB_CONTROL_OPS_GET_CHANNEL, /**< Get channel */
54         ZBLIB_MFGLIB_CONTROL_OPS_SET_POWER, /**< Set power */
55         ZBLIB_MFGLIB_CONTROL_OPS_GET_POWER, /**< Get power */
56         ZBLIB_MFGLIB_CONTROL_OPS_SET_SYNOFFSET, /**< Set synoffset */
57         ZBLIB_MFGLIB_CONTROL_OPS_GET_SYNOFFSET, /**< Get synoffset */
58         ZBLIB_MFGLIB_CONTROL_OPS_RX_START, /**< RX start */
59         ZBLIB_MFGLIB_CONTROL_OPS_RX_STOP, /**< RX stop */
60         ZBLIB_MFGLIB_CONTROL_OPS_RX_VERIFY, /**< RX verify */
61         ZBLIB_MFGLIB_CONTROL_OPS_GET_RSSI, /**< Get rssi */
62 } ZblibMfglibControlOps_e;
63
64 /* ZigBee 'mfglib control' driver APIs */
65 ZigBeeDriver *zblib_driver_mfglib_control_new(ZigBeePlugin *plugin,
66         const gchar *driver_name,
67         ZblibDriverMfglibControlOps_t *ops);
68 void zblib_driver_mfglib_control_free(ZigBeeDriver *driver);
69
70 #endif /* __ZIGBEE_LIB_DRIVER_MFGLIB_CONTROL_H__ */