/** Port. */
#define OC_RSRVD_HOSTING_PORT "port"
+/** TCP Port. */
+#define OC_RSRVD_TCP_PORT "tcp"
+
/** For Server instance ID.*/
#define OC_RSRVD_SERVER_INSTANCE_ID "sid"
#define OC_RSRVD_RESOURCE_TYPE_RDPUBLISH "oic.wk.rdpub"
/**
+ * Mark a parameter as unused. Used to prevent unused variable compiler warnings.
+ * Used in three cases:
+ * 1. in callbacks when one of the parameters are unused
+ * 2. when due to code changes a functions parameter is no longer
+ * used but must be left in place for backward compatibility
+ * reasons.
+ * 3. a variable is only used in the debug build variant and would
+ * give a build warning in release mode.
+ */
+#define OC_UNUSED(x) (void)(x)
+
+/**
* These enums (OCTransportAdapter and OCTransportFlags) must
* be kept synchronized with OCConnectivityType (below) as well as
* CATransportAdapter and CATransportFlags (in CACommon.h).
OC_FLAG_SECURE = (1 << 4),
/** IPv4 & IPv6 auto-selection is the default.*/
- /** IP adapter only.*/
+ /** IP & TCP adapter only.*/
OC_IP_USE_V6 = (1 << 5),
- /** IP adapter only.*/
+ /** IP & TCP adapter only.*/
OC_IP_USE_V4 = (1 << 6),
/** internal use only.*/
/** De-register observation, intended for internal use.*/
OC_REST_CANCEL_OBSERVE = (1 << 6),
- #ifdef WITH_PRESENCE
+#ifdef WITH_PRESENCE
/** Subscribe for all presence notifications of a particular resource.*/
OC_REST_PRESENCE = (1 << 7),
- #endif
+#endif
/** Allows OCDoResource caller to do discovery.*/
OC_REST_DISCOVER = (1 << 8)
} OCMethod;
OC_STACK_AUTHENTICATION_FAILURE,
/** Insert all new error codes here!.*/
- #ifdef WITH_PRESENCE
+#ifdef WITH_PRESENCE
OC_STACK_PRESENCE_STOPPED = 128,
OC_STACK_PRESENCE_TIMEOUT,
OC_STACK_PRESENCE_DO_NOT_HANDLE,
- #endif
+#endif
/** ERROR in stack.*/
OC_STACK_ERROR = 255
/** Error status code - END HERE.*/
uint8_t bitmap;
bool secure;
uint16_t port;
+#ifdef TCP_ADAPTER
+ uint16_t tcpPort;
+#endif
struct OCResourcePayload* next;
} OCResourcePayload;