Remove Presence macro in header files. 09/194509/1
authoragrkush <kush.agrawal@samsung.com>
Thu, 15 Nov 2018 13:16:06 +0000 (18:46 +0530)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 5 Dec 2018 06:39:09 +0000 (15:39 +0900)
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/337
(cherry picked from commit 8fa624930b9fb15f47857c83af4afe9f72b4e734)

Change-Id: I4f7929890431af2834696652d948a3ec0895823d
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
resource/csdk/stack/include/ocpresence.h
resource/csdk/stack/include/ocstack.h
resource/csdk/stack/include/octypes.h
resource/csdk/stack/include/payload_logging.h

index 8213152639cde7a7ea5139600a8ba37134d8ab62..2c497ef381bcc59b4d6427b81158e46610cd9357 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef OCPRESENCE_H_
 #define OCPRESENCE_H_
 
-#ifdef WITH_PRESENCE
-
 /**
  * The OCPresenceTrigger enum delineates the three spec-compliant modes for
  * "Trigger." These enum values are then mapped to  strings
@@ -41,5 +39,3 @@ typedef enum
     OC_PRESENCE_TRIGGER_DELETE = 2
 } OCPresenceTrigger;
 #endif
-
-#endif
index 897d7700eac482fc3f4f0fc12e06e392b8553e34..81cbab5506f4718437e74f0e929a6bc5aac08a6f 100644 (file)
@@ -245,7 +245,6 @@ OCStackResult OCCancel(OCDoHandle handle,
  */
 OCStackResult OCRegisterPersistentStorageHandler(OCPersistentStorage* persistentStorageHandler);
 
-#ifdef WITH_PRESENCE
 /**
  * When operating in  OCServer or  OCClientServer mode,
  * this API will start sending out presence notifications to clients via multicast.
@@ -277,8 +276,6 @@ OCStackResult OCStartPresence(const uint32_t ttl);
  */
 
 OCStackResult OCStopPresence();
-#endif // WITH_PRESENCE
-
 
 /**
  * This function sets default device entity handler.
index df6df44e136e7c6adf9cea0aeb0f69e65b0e8f29..1a5797b1f50e9050ec9790fe2b0bfd14bd312506 100644 (file)
@@ -79,12 +79,8 @@ extern "C" {
 /** KeepAlive URI.*/
 #define OC_RSRVD_KEEPALIVE_URI                "/oic/ping"
 
-#ifdef WITH_PRESENCE
-/** Presence */
-
 /** Presence URI through which the OIC devices advertise their presence.*/
 #define OC_RSRVD_PRESENCE_URI                 "/oic/ad"
-#endif // WITH_PRESENCE
 
 /** Presence URI through which the OIC devices advertise their device presence.*/
 #define OC_RSRVD_DEVICE_PRESENCE_URI         "/oic/prs"
@@ -95,7 +91,6 @@ extern "C" {
 /** Separator for multiple query string.*/
 #define OC_QUERY_SEPARATOR                    "&;"
 
-#ifdef WITH_PRESENCE
 /**
  *  OC_DEFAULT_PRESENCE_TTL_SECONDS sets the default time to live (TTL) for presence.
  */
@@ -123,8 +118,6 @@ extern "C" {
 /** To delete.*/
 #define OC_RSRVD_TRIGGER_DELETE         "delete"
 
-#endif // WITH_PRESENCE
-
 /**
  *  Attributes used to form a proper OIC conforming JSON message.
  */
@@ -151,10 +144,8 @@ extern "C" {
 /** To represent resource type.*/
 #define OC_RSRVD_RESOURCE_TYPE          "rt"
 
-#ifdef WITH_PRESENCE
 /** To represent resource type with presence.*/
 #define OC_RSRVD_RESOURCE_TYPE_PRESENCE "oic.wk.ad"
-#endif
 
 /** To represent resource type with device.*/
 #define OC_RSRVD_RESOURCE_TYPE_DEVICE   "oic.wk.d"
@@ -844,11 +835,9 @@ typedef enum
     /** Register observe request for all notifications, including stale notifications.*/
     OC_REST_OBSERVE_ALL    = (1 << 5),
 
-#ifdef WITH_PRESENCE
     /** Subscribe for all presence notifications of a particular resource.*/
     OC_REST_PRESENCE       = (1 << 7),
 
-#endif
     /** Allows OCDoResource caller to do discovery.*/
     OC_REST_DISCOVER       = (1 << 8)
 } OCMethod;
@@ -1029,11 +1018,9 @@ typedef enum
     OC_STACK_NOT_ALLOWED_OXM,
 
     /** Insert all new error codes here!.*/
-#ifdef WITH_PRESENCE
     OC_STACK_PRESENCE_STOPPED = 128,
     OC_STACK_PRESENCE_TIMEOUT,
     OC_STACK_PRESENCE_DO_NOT_HANDLE,
-#endif
 
     /** Request is denied by the user*/
     OC_STACK_USER_DENIED_REQ,
@@ -1313,10 +1300,8 @@ typedef enum
     PAYLOAD_TYPE_REPRESENTATION,
     /** The payload is an OCSecurityPayload */
     PAYLOAD_TYPE_SECURITY,
-#ifdef WITH_PRESENCE
     /** The payload is an OCPresencePayload */
     PAYLOAD_TYPE_PRESENCE
-#endif
 } OCPayloadType;
 
 /**
@@ -1454,7 +1439,6 @@ typedef struct
     size_t payloadSize;
 } OCSecurityPayload;
 
-#ifdef WITH_PRESENCE
 typedef struct
 {
     OCPayload base;
@@ -1463,7 +1447,6 @@ typedef struct
     OCPresenceTrigger trigger;
     char* resourceType;
 } OCPresencePayload;
-#endif
 
 /**
  * Incoming requests handled by the server. Requests are passed in as a parameter to the
index 59696c30035ea6ec9d61c9ffb1ca07e41d89b149..3faf0ad988447912fd225430b084bd5cefc86278 100644 (file)
@@ -50,10 +50,8 @@ extern "C"
     #define OIC_LOG_PAYLOAD(level, payload) OCPayloadLog((level),(payload))
     #define UUID_SIZE (16)
 
-#ifdef WITH_PRESENCE
 const char *convertTriggerEnumToString(OCPresenceTrigger trigger);
 OCPresenceTrigger convertTriggerStringToEnum(const char * triggerStr);
-#endif
 
 INLINE_API void OCPayloadLogRep(LogLevel level, OCRepPayload* payload);
 
@@ -274,7 +272,6 @@ INLINE_API void OCPayloadLogDiscovery(LogLevel level, OCDiscoveryPayload* payloa
     }
 }
 
-#ifdef WITH_PRESENCE
 INLINE_API void OCPayloadLogPresence(LogLevel level, OCPresencePayload* payload)
 {
     OIC_LOG(level, PL_TAG, "Payload Type: Presence");
@@ -283,7 +280,6 @@ INLINE_API void OCPayloadLogPresence(LogLevel level, OCPresencePayload* payload)
     OIC_LOG_V(level, PL_TAG, "\tTrigger:%s", convertTriggerEnumToString(payload->trigger));
     OIC_LOG_V(level, PL_TAG, "\tResource Type:%s", payload->resourceType);
 }
-#endif // WITH_PRESENCE
 
 INLINE_API void OCPayloadLogSecurity(LogLevel level, OCSecurityPayload* payload)
 {