#define TAG "cloudCommon"
+//[IOT-2147] Requests 50-83 are not confirmed to new OCF spec
+//disable them for 1.3 rel, later (1.3.1 or after) they should be rewritten and enabled again
+#define DISABLE_50_83_REQUESTS_FOR_1_3_REL 1
+
#define DEFAULT_HOST "10.113.68.85"//"127.0.0.1"
#define DEFAULT_PORT OC_MULTICAST_PORT
#define DEFAULT_AUTH_PROVIDER "github"
ACL_INDIVIDUAL_DELETE = 43,
ACL_INDIVIDUAL_DELETE_ACE = 44,
+#ifndef DISABLE_50_83_REQUESTS_FOR_1_3_REL
ACL_GROUP_CREATE = 50,
ACL_GROUP_FIND = 51,
ACL_GROUP_JOIN = 52,
ACL_GROUP_GET_INVITE = 81,
ACL_GROUP_DELETE_INVITE = 82,
ACL_GROUP_CANCEL_INVITE = 83,
+#endif
EXIT = 99
}CloudRequest;
printf("** %d - ACL individual delete Request\n", ACL_INDIVIDUAL_DELETE);
printf("** %d - ACL individual delete ACE Request\n", ACL_INDIVIDUAL_DELETE_ACE);
+#ifndef DISABLE_50_83_REQUESTS_FOR_1_3_REL
printf("** ACL GROUP MANAGER\n");
printf("** %d - ACL Create Group Request\n", ACL_GROUP_CREATE);
printf("** %d - ACL Find Group Request\n", ACL_GROUP_FIND);
printf("** %d - ACL Retrieve invitation Request\n", ACL_GROUP_GET_INVITE);
printf("** %d - ACL Delete invitation Request\n", ACL_GROUP_DELETE_INVITE);
printf("** %d - ACL Cancel invitation Request\n", ACL_GROUP_CANCEL_INVITE);
+#endif
printf("** EXIT\n");
printf("** %d - Exit cloud %s\n", EXIT, title);
OICFree(aclId);
}
+#ifndef DISABLE_50_83_REQUESTS_FOR_1_3_REL
/**
* This function prints group id and calls default callback function handleCB()
*
handleCB(ctx, response, gp);
OICFree(gp);
}
+#endif
/**
* This function prints received acl and calls default callback function handleCB()
//TODO: changes in aclresources.c required to fix that
}
+#ifndef DISABLE_50_83_REQUESTS_FOR_1_3_REL
/**
* This function prints received group id list and calls default callback function handleCB()
*
handleCB(ctx, response, gidList);
clearStringArray((stringArray_t *)gidList);
}
+#endif
/**
* This function prints received acl and calls default callback function handleCB()
DeleteCrl((OicSecCrl_t *)crl);
}
+#ifndef DISABLE_50_83_REQUESTS_FOR_1_3_REL
/**
* This function prints received invitation response and calls default callback function handleCB()
*
clearInviteResponse((inviteResponse_t *)invite);
OICFree(invite);
}
+#endif
static OCStackResult saveTrustCert(void)
{
case CRL_POST:
res = OCWrapperPostCRL(&endPoint, handleCB);
break;
+#ifndef DISABLE_50_83_REQUESTS_FOR_1_3_REL
case ACL_GROUP_CREATE:
res = OCWrapperAclCreateGroup(&endPoint, handleAclCreateGroupCB);
break;
case ACL_POLICY_CHECK_REQUEST:
res = OCWrapperAclPolicyCheck(&endPoint, handleAclPolicyCheckCB);
break;
+#endif
case ACL_ID_GET_BY_DEVICE:
res = OCWrapperAclIdGetByDevice(&endPoint, handleAclIdCB);
break;