Imported Upstream version 0.9.2
[platform/upstream/iotivity.git] / resource / csdk / stack / include / internal / ocresource.h
index acd6de4..6fe298e 100644 (file)
@@ -126,26 +126,24 @@ typedef struct resourceinterface_t {
     /*** Future placeholder for access control and policy ***/
 } OCResourceInterface;
 
-typedef struct rsrc_t {
-    struct rsrc_t *next; // Points to next resource in list
+typedef struct OCResource {
+    struct OCResource *next; // Points to next resource in list
     // Relative path on the device; will be combined with base url to create fully qualified path
-    char *host;
     char *uri;
     OCResourceType *rsrcType; // Resource type(s); linked list
     OCResourceInterface *rsrcInterface; // Resource interface(s); linked list
     OCAttribute *rsrcAttributes; // Resource interface(s); linked list
     // Array of pointers to resources; can be used to represent a container of resources
     // (i.e. hierarchies of resources) or for reference resources (i.e. for a resource collection)
-    struct rsrc_t *rsrcResources[MAX_CONTAINED_RESOURCES];
+    struct OCResource *rsrcResources[MAX_CONTAINED_RESOURCES];
     //struct rsrc_t *rsrcResources;
     // Pointer to function that handles the entity bound to the resource.
     // This handler has to be explicitly defined by the programmer
     OCEntityHandler entityHandler;
+    // callback parameter
+    void * entityHandlerCallbackParam;
     // Properties on the resource – defines meta information on the resource
     OCResourceProperty resourceProperties ; /* ACTIVE, DISCOVERABLE etc */
-    // Pointer to an opaque object where app/user specific data can be placed with the resource;
-    // this could be information for the entity handler between invocations
-    void *context;
     // NOTE: Methods supported by this resource should be based on the interface targeted
     // i.e. look into the interface structure based on the query request Can be removed here;
     // place holder for the note above