X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fstack%2Finclude%2Finternal%2Focobserve.h;h=37c8c0992b1b9811570820db44d1a01e12e24dbd;hb=refs%2Ftags%2Fupstream%2F0.9.2;hp=fc7677793d7fdb5c89ba289fd31e647a6648db5d;hpb=935fdb9b67b6c10d007e652e9e2e028fd6ccfe09;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/stack/include/internal/ocobserve.h b/resource/csdk/stack/include/internal/ocobserve.h index fc76777..37c8c09 100644 --- a/resource/csdk/stack/include/internal/ocobserve.h +++ b/resource/csdk/stack/include/internal/ocobserve.h @@ -45,11 +45,8 @@ typedef struct ResourceObserver uint8_t tokenLength; // Resource handle OCResource *resource; - //TODO bundle it in Endpoint structure(address, uri, type, secured) - /** Remote Endpoint address **/ - CAAddress_t addressInfo; - /** Connectivity of the endpoint**/ - CATransportType_t connectivityType; + /** Remote Endpoint **/ + OCDevAddr devAddr; // Quality of service of the request OCQualityOfService qos; // number of times the server failed to reach the observer @@ -74,7 +71,7 @@ typedef struct ResourceObserver * @return ::OC_STACK_OK on success, some other value upon failure. */ OCStackResult SendAllObserverNotification (OCMethod method, OCResource *resPtr, uint32_t maxAge, - OCResourceType *resourceType, OCQualityOfService qos); + OCPresenceTrigger trigger, OCResourceType *resourceType, OCQualityOfService qos); #else /** * Create an observe response and send to all observers in the observe list. @@ -95,14 +92,14 @@ OCStackResult SendAllObserverNotification (OCMethod method, OCResource *resPtr, * @param resource Observed resource * @param obsIdList List of observation ids that need to be notified. * @param numberOfIds Number of observation ids included in obsIdList. - * @param notificationJSONPayload - JSON encoded payload to send in notification. + * @param payload - OCRepresentationPayload object representing the message * @param maxAge Time To Live (in seconds) of observation. * @param qos Desired quality of service of the observation notifications. * @return ::OC_STACK_OK on success, some other value upon failure. */ OCStackResult SendListObserverNotification (OCResource * resource, OCObservationId *obsIdList, uint8_t numberOfIds, - const char *notificationJSONPayload, uint32_t maxAge, + const OCRepPayload *payload, uint32_t maxAge, OCQualityOfService qos); /** @@ -128,8 +125,7 @@ OCStackResult GenerateObserverId (OCObservationId *observationId); * @param tokenLength Length of token. * @param resHandle Resource handle. * @param qos Quality of service of observation. - * @param addressInfo Address of observer. - * @param connectivityType Connection type. + * @param observer address * @return ::OC_STACK_OK on success, some other value upon failure. */ OCStackResult AddObserver (const char *resUri, @@ -139,8 +135,7 @@ OCStackResult AddObserver (const char *resUri, uint8_t tokenLength, OCResource *resHandle, OCQualityOfService qos, - const CAAddress_t *addressInfo, - CATransportType_t connectivityType); + const OCDevAddr *devAddr); /** * Delete observer with specified token from list of observers.