Updated license header to reference Apache 2.0 License
[platform/upstream/iotivity.git] / include / OCPlatformHandler.h
1 //******************************************************************
2 //
3 // Copyright 2014 Intel Corporation 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 /// @file OCPlatformHandler.h 
22
23 /// @brief      This file contains the declaration of classes and its members related to 
24 ///                     OCPlatformHandler.
25
26 #ifndef __OCPLATFORMHANDLER_H
27 #define __OCPLATFORMHANDLER_H
28
29 #include "OCApi.h"
30
31 namespace OC
32 {
33         class OCPlatform;
34
35         /**
36         * @brief        OCPlatformHandler is a pure abstract class and it can be used for 
37         *                       registering and getting callbacks
38         */
39         class OCPlatformHandler
40         {
41         public:
42                 OCPlatformHandler(void);
43
44                 virtual ~OCPlatformHandler(void);
45
46                 /**
47                 * @fn   This function is called when the platform gets initialzed
48                 * 
49                 * @param platform pointer to OCPlatform object
50                 */
51                 virtual void onPlatformInitialized(OCPlatform *platform) = 0;
52
53                 /**
54                 * @fn   This function is called when platform status is changed
55                 * 
56                 * @param platform - pointer to OCPlatform object
57                 * @param status - OCPlatform status
58                 */
59                 virtual void onPlatformStatusChanged(OCPlatform *platform, OCPlatformStatus status) = 0;
60         };
61 }
62
63 #endif // __OCPLATFORMHANDLER_H