1 //******************************************************************
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
13 typedef struct ClientCB {
14 // callback method defined in application address space
15 OCClientApplicationCBType callBack;
16 // callback context data
18 // when a response is recvd with this token, above callback will be invoked
20 // next node in this list
21 struct ClientCB *next;
24 //-- AddClientCB -----------------------------------------------------------
27 * This method is used to add a client callback method in cbList.
30 * address to client callback function.
34 * @retval 0 for Success, otherwise some error value
36 //------------------------------------------------------------------------
37 int AddClientCB(OCCallbackData *cbData, OCToken * token);
39 //-- DeleteClientCB -----------------------------------------------------------
42 * This method is used to remove a callback node from cbList.
45 * address to client callback node.
47 //------------------------------------------------------------------------
48 void DeleteClientCB(ClientCB *cbNode);
51 //-- GetClientCB -----------------------------------------------------------
54 * This method is used to search a cb node in cbList.
57 * token to search for.
59 * @retval address of the node if found, otherwise NULL
61 //------------------------------------------------------------------------
62 ClientCB* GetClientCB(OCToken * token);
64 //-- DeleteClientCBList -----------------------------------------------------------
67 * This method is used to clear the cbList.
70 //------------------------------------------------------------------------
71 void DeleteClientCBList();