Commit 4f7d75ee authored by Christopher Wood's avatar Christopher Wood

CCNxName constructor replacement.

parent f4cd4d4c
......@@ -301,7 +301,7 @@ CCNxControl *ccnxControl_CreateRemoveRouteRequest(const CPIRouteEntry *route);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/parc/csl/media/thingie");
* CCNxName *name = ccnxName_CreateFromCString("lci:/parc/csl/media/thingie");
*
* CCNxControl *control = ccnxControl_CreateAddRouteToSelfRequest(name);
* ...
......@@ -331,7 +331,7 @@ CCNxControl *ccnxControl_CreateAddRouteToSelfRequest(const CCNxName *name);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/parc/csl/media/thingie");
* CCNxName *name = ccnxName_CreateFromCString("lci:/parc/csl/media/thingie");
*
* CCNxControl *control = ccnxControl_CreateRemoveRouteToSelfRequest(name);
* ...
......@@ -359,7 +359,7 @@ CCNxControl *ccnxControl_CreateRemoveRouteToSelfRequest(const CCNxName *name);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/boose/roo/pie");
* CCNxName *name = ccnxName_CreateFromCString("lci:/boose/roo/pie");
* PARCJSON *cpiRequest = cpiCancelFlow_CreateRequest(name);
* CCNxControl *control = ccnxControl_CreateCPIRequest(cpiRequest);
*
......@@ -493,7 +493,7 @@ CCNxControl *ccnxControl_CreateFlushRequest(void);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/boose/roo/pie");
* CCNxName *name = ccnxName_CreateFromCString("lci:/boose/roo/pie");
* CCNxControl *control = ccnxControl_CreateCancelFlowRequest(name);
*
* ...
......
......@@ -87,7 +87,7 @@ typedef struct cpi_route_entry CPIRouteEntry;
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval lifetime = { 3600, 0 };
......@@ -119,7 +119,7 @@ CPIRouteEntry *cpiRouteEntry_Create(CCNxName *prefix, unsigned interfaceIndex, c
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval lifetime = { 3600, 0 };
* unsigned cost = 200;
......@@ -145,7 +145,7 @@ CPIRouteEntry *cpiRouteEntry_CreateSymbolic(CCNxName *prefix, const char *symbol
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_FromURI("lci:/a/b");
* CCNxName *prefix = ccnxName_FromCString("lci:/a/b");
* CPIRouteEntry *route = cpiRouteEntry_CreateRouteToSelf(prefix);
* ccnxName_Release(&prefix);
* }
......@@ -163,7 +163,7 @@ CPIRouteEntry *cpiRouteEntry_CreateRouteToSelf(const CCNxName *name);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_FromURI("lci:/a/b");
* CCNxName *prefix = ccnxName_FromCString("lci:/a/b");
* CPIRouteEntry *route = cpiRouteEntry_CreateRouteToSelf(prefix);
* ccnxName_Release(&prefix);
*
......@@ -186,7 +186,7 @@ void cpiRouteEntry_Destroy(CPIRouteEntry **routeEntryPtr);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_FromURI("lci:/a/b");
* CCNxName *prefix = ccnxName_FromCString("lci:/a/b");
* CPIRouteEntry *route = cpiRouteEntry_CreateRouteToSelf(prefix);
* ccnxName_Release(&prefix);
*
......@@ -231,11 +231,11 @@ CPIRouteEntry *cpiRouteEntry_Copy(const CPIRouteEntry *routeEntry);
* CPIRouteEntry *bufferA = parcBuffer_Allocate(10);
* CPIRouteEntry *bufferB = parcBuffer_Allocate(10);
*
* CCNxName *prefixA = ccnxName_FromURI("lci:/a/b");
* CCNxName *prefixA = ccnxName_FromCString("lci:/a/b");
* CPIRouteEntry *routeA = cpiRouteEntry_CreateRouteToSelf(prefixA);
* ccnxName_Release(&prefixA);
*
* CCNxName *prefixB = ccnxName_FromURI("lci:/a/b");
* CCNxName *prefixB = ccnxName_FromCString("lci:/a/b");
* CPIRouteEntry *routeB = cpiRouteEntry_CreateRouteToSelf(prefixB);
* ccnxName_Release(&prefixB);
*
......@@ -260,7 +260,7 @@ bool cpiRouteEntry_Equals(const CPIRouteEntry *a, const CPIRouteEntry *b);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = -1; // unknown
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval *lifetimePtr = NULL;
......@@ -285,7 +285,7 @@ void cpiRouteEntry_SetInterfaceIndex(CPIRouteEntry *route, unsigned interfaceInd
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = -1; // unknown
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval *lifetimePtr = NULL;
......@@ -310,7 +310,7 @@ const CCNxName *cpiRouteEntry_GetPrefix(const CPIRouteEntry *route);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval *lifetimePtr = NULL;
......@@ -338,7 +338,7 @@ unsigned cpiRouteEntry_GetInterfaceIndex(const CPIRouteEntry *route);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress *nexthop = NULL;
* struct timeval lifetime = { 3600, 0 };
......@@ -365,7 +365,7 @@ const CPIAddress *cpiRouteEntry_GetNexthop(const CPIRouteEntry *route);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval *lifetimePtr = NULL;
......@@ -393,7 +393,7 @@ bool cpiRouteEntry_HasLifetime(const CPIRouteEntry *route);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval lifetime = { 3600, 0 };
......@@ -420,7 +420,7 @@ struct timeval cpiRouteEntry_GetLifetime(const CPIRouteEntry *route);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval lifetime = { 3600, 0 };
......@@ -447,7 +447,7 @@ CPINameRouteProtocolType cpiRouteEntry_GetRouteProtocolType(const CPIRouteEntry
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval lifetime = { 3600, 0 };
......@@ -474,7 +474,7 @@ CPINameRouteType cpiRouteEntry_GetRouteType(const CPIRouteEntry *route);
* Example:
* @code
* {
* CCNxName * prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName * prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress * nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval lifetime = { 3600, 0 };
......@@ -500,7 +500,7 @@ unsigned cpiRouteEntry_GetCost(const CPIRouteEntry *route);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval lifetime = { 3600, 0 };
......@@ -529,7 +529,7 @@ PARCJSON *cpiRouteEntry_ToJson(const CPIRouteEntry *route);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval lifetime = { 3600, 0 };
......@@ -564,7 +564,7 @@ CPIRouteEntry *cpiRouteEntry_FromJson(PARCJSON *json);
* Example:
* @code
* {
* CCNxName *prefix = ccnxName_CreateFromURI("lci:/howdie/stranger");
* CCNxName *prefix = ccnxName_CreateFromCString("lci:/howdie/stranger");
* unsigned ifidx = 55;
* CPIAddress *nexthop = cpiAddress_CreateFromInet(&(struct sockaddr_in) { .sin_addr.s_addr = 0x01020304 });
* struct timeval lifetime = { 3600, 0 };
......
......@@ -91,7 +91,7 @@ typedef enum {
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *expected = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
* }
* @endcode
......@@ -113,7 +113,7 @@ NotifyStatus *notifyStatus_Create(int apiFd, NotifyStatusCode code, CCNxName *na
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* NotifyStatus *x_2 = notifyStatus_Acquire(status);
......@@ -141,7 +141,7 @@ NotifyStatus *notifyStatus_Acquire(const NotifyStatus *status);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* notifyStatus_Release(&status);
......@@ -162,7 +162,7 @@ void notifyStatus_Release(NotifyStatus **statusPtr);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status1 = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
* NotifyStatus *status2 = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
......@@ -183,7 +183,7 @@ bool notifyStatus_Equals(const NotifyStatus *x, const NotifyStatus *y);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* notifyStatus_Display(status, 0);
......@@ -204,7 +204,7 @@ void notifyStatus_Display(const NotifyStatus *status, int indentation);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* int fd = notifyStatus_GetFiledes(status);
......@@ -223,7 +223,7 @@ int notifyStatus_GetFiledes(const NotifyStatus *status);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* NotifyStatusCode code = notifyStatus_GetStatusCode(status);
......@@ -242,7 +242,7 @@ NotifyStatusCode notifyStatus_GetStatusCode(const NotifyStatus *status);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* NotifyStatusCode code = notifyStatus_GetStatusCode(status);
......@@ -261,7 +261,7 @@ CCNxName *notifyStatus_GetName(const NotifyStatus *status);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* NotifyStatusCode code = notifyStatus_GetStatusCode(status);
......@@ -281,7 +281,7 @@ char *notifyStatus_GetMessage(const NotifyStatus *status);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* PARCJSON *json = notifyStatus_ToJSON(status);
......@@ -301,7 +301,7 @@ PARCJSON *notifyStatus_ToJSON(const NotifyStatus *status);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* PARCJSON *json = notifyStatus_ToJSON(status);
......@@ -323,7 +323,7 @@ NotifyStatus *notifyStatus_ParseJSON(const PARCJSON *json);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* if (notifyStatus_IsConnectionOpen(status)) {
......@@ -345,7 +345,7 @@ bool notifyStatus_IsConnectionOpen(const NotifyStatus *status);
* Example:
* @code
* {
* CCNxName *name = ccnxName_CreateFromURI("lci:/a/b/c");
* CCNxName *name = ccnxName_CreateFromCString("lci:/a/b/c");
* NotifyStatus *status = notifyStatus_Create(1, notifyStatus_CONNECTION_OPEN, name, "Good to go");
*
* if (notifyStatus_IsFlowControlStarted(status)) {
......
......@@ -118,7 +118,7 @@ trafficTools_ReadAndVerifySegment(PARCEventQueue *queue, CCNxName *basename, uin
CCNxContentObject *
trafficTools_CreateSignedContentObject()
{
CCNxName *name = ccnxName_CreateFromURI("lci:/hello/dolly");
CCNxName *name = ccnxName_CreateFromCString("lci:/hello/dolly");
PARCBuffer *payload = parcBuffer_WrapCString("hello");
CCNxContentObject *result = ccnxContentObject_CreateWithDataPayload(name, payload);
......@@ -142,7 +142,7 @@ trafficTools_CreateSignedContentObject()
CCNxContentObject *
trafficTools_CreateContentObjectWithPayload(PARCBuffer *contents)
{
CCNxName *name = ccnxName_CreateFromURI("lci:/hello/dolly");
CCNxName *name = ccnxName_CreateFromCString("lci:/hello/dolly");
CCNxContentObject *result = ccnxContentObject_CreateWithDataPayload(name, contents);
......@@ -193,7 +193,7 @@ trafficTools_CreateTransportMessageWithSignedContentObjectWithName(RtaConnection
CCNxInterest *
trafficTools_CreateInterest(void)
{
CCNxName *name = ccnxName_CreateFromURI("lci:/there/were/bells/on/the/hill");
CCNxName *name = ccnxName_CreateFromCString("lci:/there/were/bells/on/the/hill");
CCNxInterest *interest = ccnxInterest_CreateSimple(name);
ccnxName_Release(&name);
......@@ -203,7 +203,7 @@ trafficTools_CreateInterest(void)
CCNxTlvDictionary *
trafficTools_CreateDictionaryInterest(void)
{
CCNxName *name = ccnxName_CreateFromURI("lci:/there/were/bells/on/the/hill");
CCNxName *name = ccnxName_CreateFromCString("lci:/there/were/bells/on/the/hill");
CCNxTlvDictionary *interest = ccnxInterest_CreateSimple(name);
ccnxName_Release(&name);
......@@ -232,7 +232,7 @@ TransportMessage *
trafficTools_CreateTransportMessageWithDictionaryInterest(RtaConnection *connection, CCNxTlvDictionary_SchemaVersion schema)
{
CCNxTlvDictionary *interest;
CCNxName *name = ccnxName_CreateFromURI("lci:/lost/in/space");
CCNxName *name = ccnxName_CreateFromCString("lci:/lost/in/space");
CCNxInterestInterface *impl = NULL;
......
......@@ -185,7 +185,7 @@ LONGBOW_TEST_FIXTURE_TEARDOWN(Local)
static CCNxTlvDictionary *
createSignedContentObject(void)
{
CCNxName *name = ccnxName_CreateFromURI("lci:/some/name");
CCNxName *name = ccnxName_CreateFromCString("lci:/some/name");
PARCBuffer *payload = parcBuffer_Flip(parcBuffer_PutArray(parcBuffer_Allocate(20), 11, (uint8_t *) "the payload"));
CCNxTlvDictionary *contentObject = ccnxContentObject_CreateWithDataPayload(name, payload);
parcBuffer_Release(&payload);
......@@ -283,7 +283,7 @@ LONGBOW_TEST_CASE(Local, vegasSession_GetSegnumFromObject)
};
for (int i = 0; test_vectors[i].uri != NULL; i++) {
CCNxName *name = ccnxName_CreateFromURI(test_vectors[i].uri);
CCNxName *name = ccnxName_CreateFromCString(test_vectors[i].uri);
CCNxTlvDictionary *contentObject = ccnxContentObject_CreateWithDataPayload(name, NULL);
uint64_t testSeqnum = -1;
......@@ -721,4 +721,3 @@ main(int argc, char *argv[])
LongBowRunner *testRunner = LONGBOW_TEST_RUNNER_CREATE(Fc_Vegas);
exit(longBowMain(argc, argv, testRunner, NULL));
}
......@@ -190,7 +190,7 @@ LONGBOW_TEST_FIXTURE_TEARDOWN(Local)
static CCNxTlvDictionary *
createSignedContentObject(void)
{
CCNxName *name = ccnxName_CreateFromURI("lci:/some/name");
CCNxName *name = ccnxName_CreateFromCString("lci:/some/name");
PARCBuffer *payload = parcBuffer_Flip(parcBuffer_PutArray(parcBuffer_Allocate(20), 11, (uint8_t *) "the payload"));
CCNxTlvDictionary *contentObject = ccnxContentObject_CreateWithDataPayload(name, payload);
parcBuffer_Release(&payload);
......@@ -293,7 +293,7 @@ LONGBOW_TEST_CASE(Local, vegasSession_GetSegnumFromObject)
};
for (int i = 0; test_vectors[i].uri != NULL; i++) {
CCNxName *name = ccnxName_CreateFromURI(test_vectors[i].uri);
CCNxName *name = ccnxName_CreateFromCString(test_vectors[i].uri);
CCNxTlvDictionary *contentObject = ccnxContentObject_CreateWithDataPayload(name, NULL);
uint64_t testSeqnum = -1;
......@@ -685,4 +685,3 @@ main(int argc, char *argv[])
LongBowRunner *testRunner = LONGBOW_TEST_RUNNER_CREATE(VegasSession);
exit(longBowMain(argc, argv, testRunner, NULL));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment