Initial merge-commit of the OIC code. Should successfully do discovery for single...
[platform/upstream/iotivity.git] / include / OCResourceHandler.h
1 //******************************************************************
2 //
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
5
6 /// @file OCResourceHandler.h 
7
8 /// @brief      This file contains the declaration of classes and its members related to 
9 ///                     ResourceHandler.
10
11 #ifndef _OCRESOURCEHANDLER_H
12 #define _OCRESOURCEHANDLER_H
13
14 #include "ocapi.h"
15 #include "OCResource.h"
16
17 namespace OC 
18 {
19         /**
20         * @brief        OCResourceHandler is a pure abstract class and it can be used for 
21         *                       resource related callbacks
22         */
23         class OCResourceHandler
24         {
25         public:
26                 virtual ~OCResourceHandler(void){}
27                 /**
28                 * @fn   This function is called when it finds the resource
29                 * 
30                 * @param update resource result information
31                 * @param params reserved
32                 */
33                 virtual void onFoundResource(OCResourceResult *update, void *params) = 0;
34                 /**
35                 * @fn   This function is called when the find is completed
36                 * 
37                 * @param propertyName name of the property
38                 * @param value value of the property
39                 */
40                 virtual void onCompleted() = 0;
41                 /**
42                 * @fn   This function is called when the find is failed
43                 * 
44                 */
45                 virtual void onFailed() = 0;
46
47         };
48 }
49 #endif //_OCRESOURCEHANDLER_H
50