remove the build macro(tizen_build_binary_release_type_eng)
[platform/upstream/iotivity.git] / plugins / include / plugininterface.h
1 //******************************************************************
2 //
3 // Copyright 2014 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 /**
22  * @file
23  *
24  * This file contains APIs for PIPlugin module to be implemented.
25  */
26
27 #ifndef PLUGININTERFACE_H_
28 #define PLUGININTERFACE_H_
29
30 #include "plugintypes.h"
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif // __cplusplus
35
36 /**
37  *
38  * Makes any required calls to instantiate plugin's radio.
39  *
40  * @param[in]  comPort The com port which this plugin is located.
41  * @param[in]  pluginType The type of plugin to start.
42  * @param[out] plugin The plugin handle that will be started.
43  *
44  */
45 OCStackResult PIStartPlugin(const char * comPort, PIPluginType pluginType, PIPlugin ** plugin);
46
47 /**
48  *
49  * Makes any required calls to stop plugin.
50  *
51  * @param[in] plugin The plugin to be stopped.
52  *
53  */
54 OCStackResult PIStopPlugin(PIPlugin * plugin);
55
56 /**
57  *
58  * Makes any required calls to stop all plugins.
59  *
60  */
61 OCStackResult PIStopAll();
62
63 /**
64  *
65  * Performs any required work on this specific plugin to initiate it's respective
66  * discovery operation.
67  *
68  * @param[in] plugin The plugin to initiate it's discovery operation on.
69  *
70  */
71 OCStackResult PISetup(PIPlugin * plugin);
72
73 /**
74  *
75  * Called in main loop of application. Gives cycles for Plugin Interface'
76  * internal operation.
77  *
78  * @param[in] plugin The plugin to get cycles from this function's invocation.
79  *
80  */
81 OCStackResult PIProcess(PIPlugin * plugin);
82
83 #ifdef __cplusplus
84 }
85 #endif // __cplusplus
86
87 #endif /* PLUGININTERFACE_H_ */