if (response == NS_DISCOVERED)
{
printf("notification resource discovered\n");
- printf("subscribe result %d\n", NSSubscribe(provider));
+ printf("subscribe result %d\n", NSSubscribe(provider->providerId));
printf("startSubscribing\n");
}
NSOICFree(prov);
}
-NSSyncInfo_internal * NSCopySyncInfo(NSSyncInfo_internal * syncInfo)
-{
- NS_VERIFY_NOT_NULL(syncInfo, NULL);
-
- NSProviderConnectionInfo * connections = NSCopyProviderConnections(syncInfo->connection);
- NS_VERIFY_NOT_NULL(connections, NULL);
-
- NSSyncInfo_internal * newSyncInfo = (NSSyncInfo_internal *)OICMalloc(sizeof(NSSyncInfo_internal));
- NS_VERIFY_NOT_NULL_WITH_POST_CLEANING(newSyncInfo, NULL, NSRemoveConnections(connections));
-
- OICStrcpy(newSyncInfo->providerId, sizeof(char) * NS_DEVICE_ID_LENGTH, syncInfo->providerId);
- newSyncInfo->messageId = syncInfo->messageId;
- newSyncInfo->state = syncInfo->state;
- newSyncInfo->connection = connections;
-
- return newSyncInfo;
-}
-
-void NSRemoveSyncInfo(NSSyncInfo_internal * syncInfo)
-{
- NS_VERIFY_NOT_NULL_V(syncInfo);
-
- NSRemoveConnections(syncInfo->connection);
-
- NSOICFree(syncInfo);
-}
-
OCStackResult NSInvokeRequest(OCDoHandle * handle,
OCMethod method, const OCDevAddr * addr,
const char * queryUrl, OCPayload * payload,
void NSRemoveProvider_internal(NSProvider_internal *);
void NSRemoveProvider(NSProvider *);
-NSSyncInfo_internal * NSCopySyncInfo(NSSyncInfo_internal *);
-void NSRemoveSyncInfo(NSSyncInfo_internal *);
-
NSTopicLL * NSCopyTopicNode(NSTopicLL *);
void NSRemoveTopicNode(NSTopicLL *);
NSResult NSInsertTopicNode(NSTopicLL *, NSTopicLL *);