Lines Matching refs:r

267     coap_resource_t *r;  in hnd_post_test()  local
275 r = coap_resource_init(uri->data, uri->length, 0); in hnd_post_test()
276 coap_register_handler(r, COAP_REQUEST_GET, hnd_get_resource); in hnd_post_test()
277 coap_register_handler(r, COAP_REQUEST_DELETE, hnd_delete_resource); in hnd_post_test()
286 coap_add_resource(ctx, r); in hnd_post_test()
287 coap_add_payload(r->key, test_payload, uri); in hnd_post_test()
534 coap_resource_t *r; in init_resources() local
545 r = coap_resource_init((unsigned char *)"test", 4, 0); in init_resources()
546 coap_register_handler(r, COAP_REQUEST_GET, hnd_get_resource); in init_resources()
547 coap_register_handler(r, COAP_REQUEST_POST, hnd_post_test); in init_resources()
548 coap_register_handler(r, COAP_REQUEST_PUT, hnd_put_test); in init_resources()
549 coap_register_handler(r, COAP_REQUEST_DELETE, hnd_delete_test); in init_resources()
551 coap_add_attr(r, (unsigned char *)"ct", 2, (unsigned char *)"0", 1, 0); in init_resources()
552 coap_add_attr(r, (unsigned char *)"rt", 2, (unsigned char *)"test", 4, 0); in init_resources()
553 coap_add_attr(r, (unsigned char *)"if", 2, (unsigned char *)"core#b", 6, 0); in init_resources()
555 coap_add_attr(r, (unsigned char *)"obs", 3, NULL, 0, 0); in init_resources()
557 coap_add_resource(ctx, r); in init_resources()
558 coap_add_payload(r->key, test_payload, NULL); in init_resources()
567 r = coap_resource_init((unsigned char *)"large", 5, 0); in init_resources()
568 coap_register_handler(r, COAP_REQUEST_GET, hnd_get_resource); in init_resources()
570 coap_add_attr(r, (unsigned char *)"ct", 2, (unsigned char *)"41", 2, 0); in init_resources()
571 coap_add_attr(r, (unsigned char *)"rt", 2, (unsigned char *)"large", 5, 0); in init_resources()
572 coap_add_resource(ctx, r); in init_resources()
576 coap_add_payload(r->key, test_payload, NULL); in init_resources()
588 r = coap_resource_init((unsigned char *)"seg1/seg2/seg3", 14, 0); in init_resources()
589 coap_register_handler(r, COAP_REQUEST_GET, hnd_get_resource); in init_resources()
591 coap_add_attr(r, (unsigned char *)"ct", 2, (unsigned char *)"0", 1, 0); in init_resources()
592 coap_add_resource(ctx, r); in init_resources()
594 coap_add_payload(r->key, test_payload, NULL); in init_resources()
598 r = coap_resource_init((unsigned char *)"query", 5, 0); in init_resources()
599 coap_register_handler(r, COAP_REQUEST_GET, hnd_get_query); in init_resources()
601 coap_add_attr(r, (unsigned char *)"ct", 2, (unsigned char *)"0", 1, 0); in init_resources()
602 coap_add_resource(ctx, r); in init_resources()
605 r = coap_resource_init((unsigned char *)"separate", 8, 0); in init_resources()
606 coap_register_handler(r, COAP_REQUEST_GET, hnd_get_separate); in init_resources()
608 coap_add_attr(r, (unsigned char *)"ct", 2, (unsigned char *)"0", 1, 0); in init_resources()
609 coap_add_attr(r, (unsigned char *)"rt", 2, (unsigned char *)"separate", 8, 0); in init_resources()
610 coap_add_resource(ctx, r); in init_resources()