Enable ZigBee eventing in Plugin Interface through to IoTivity.
[platform/upstream/iotivity.git] / plugins / zigbee_wrapper / include / zigbee_wrapper.h
1 //******************************************************************
2 //
3 // Copyright 2015 Intel Mobile Communications GmbH All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //      http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 #include "plugintranslatortypes.h"
22
23 /**
24  * @file
25  *
26  * This file contains the interface for the ZigBee Radio.
27  */
28
29 /**
30  * Initializes the specified ZigBee radio at location comPort.
31  *
32  * @param[in] comPort The location the ZigBee radio is located at.
33  *
34  * @param[out] plugin A pointer to the plugin that has been started.
35  *
36  * @param[in] newResourceCB A function pointer to the callback that will be
37  *                          invoked when a ZigBee cluster is found that matches
38  *                          a valid OIC resource.
39  *
40  * @param[in] observeNotificationUpdate A function pointer to the callback that will be
41  *                                      invoked when a Zigbee Zone IAS update occurs that
42  *                                      should be mapped to IoTivity's observe functionality.
43  */
44 OCStackResult ZigbeeInit(const char * comPort, PIPlugin_Zigbee ** plugin,
45                          PINewResourceFound newResourceCB,
46                          PIObserveNotificationUpdate observeNotificationUpdate);
47
48 /**
49  * Initiates the discovery operation associated with this ZigBee radio.
50  *
51  * @param[in] plugin A pointer to the current ZigBee radio context.
52  */
53 OCStackResult ZigbeeDiscover(PIPlugin_Zigbee * plugin);
54
55 /**
56  * De-Initializes the specified ZigBee radio.
57  *
58  * @param[in] plugin A pointer to the current ZigBee radio context.
59  */
60 OCStackResult ZigbeeStop(PIPlugin_Zigbee * plugin);
61
62 /**
63  * Called from upper layer. Gives cycles for internal operation.
64  *
65  * @param[in] plugin A pointer to the current ZigBee radio context.
66  */
67 OCStackResult ZigbeeProcess(PIPlugin_Zigbee * plugin);