HomePort
rest_intern.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011 Aalborg University. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification, are
5  * permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice, this list of
8  * conditions and the following disclaimer.
9  *
10  * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11  * of conditions and the following disclaimer in the documentation and/or other materials
12  * provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY Aalborg University ''AS IS'' AND ANY EXPRESS OR IMPLIED
15  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Aalborg University OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  *
24  * The views and conclusions contained in the software and documentation are those of the
25  * authors and should not be interpreted as representing official policies, either expressed
26  */
27 
28 #ifndef HOMEPORT_REST_INTERN_H
29 #define HOMEPORT_REST_INTERN_H
30 
31 #include "hpd/hpd_types.h"
32 
33 typedef struct hpd_rest hpd_rest_t;
34 
37 
38 // ALL keys starts with _ to avoid conflicts with adapter provided ones..
39 static const char * const HPD_REST_KEY_ID = "_id";
40 static const char * const HPD_REST_KEY_URI = "_uri";
41 static const char * const HPD_REST_KEY_GET = "_get";
42 static const char * const HPD_REST_KEY_PUT = "_put";
43 static const char * const HPD_REST_KEY_PARAMETER = "_parameter";
44 static const char * const HPD_REST_KEY_SERVICE = "_service";
45 static const char * const HPD_REST_KEY_DEVICE = "_device";
46 static const char * const HPD_REST_KEY_URL_ENCODED_CHARSET = "_urlEncodedCharset";
47 static const char * const HPD_REST_KEY_ADAPTER = "_adapter";
48 static const char * const HPD_REST_KEY_VALUE = "_value";
49 static const char * const HPD_REST_KEY_CONFIGURATION = "_configuration";
50 static const char * const HPD_REST_KEY_TIMESTAMP = "_timestamp";
51 
52 static const char * const HPD_REST_VAL_TRUE = "1";
53 static const char * const HPD_REST_VAL_ASCII = "ASCII";
54 
55 #endif //HOMEPORT_HPD_REST_INTERN_H
static const char *const HPD_REST_KEY_CONFIGURATION
Definition: rest_intern.h:49
static const char *const HPD_REST_KEY_VALUE
Definition: rest_intern.h:48
static const char *const HPD_REST_VAL_ASCII
Definition: rest_intern.h:53
static const char *const HPD_REST_KEY_PARAMETER
Definition: rest_intern.h:43
char * url
const hpd_module_t * context
Definition: rest.c:57
static const char *const HPD_REST_KEY_URL_ENCODED_CHARSET
Definition: rest_intern.h:46
static const char *const HPD_REST_KEY_DEVICE
Definition: rest_intern.h:45
static const char *const HPD_REST_KEY_ID
Definition: rest_intern.h:39
static const char *const HPD_REST_KEY_GET
Definition: rest_intern.h:41
static const char *const HPD_REST_KEY_SERVICE
Definition: rest_intern.h:44
enum hpd_error hpd_error_t
Definition: hpd_types.h:167
static const char *const HPD_REST_KEY_PUT
Definition: rest_intern.h:42
static const char *const HPD_REST_VAL_TRUE
Definition: rest_intern.h:52
hpd_error_t hpd_rest_url_create(hpd_rest_t *rest, hpd_service_id_t *service, char **url)
Definition: rest.c:124
static const char *const HPD_REST_KEY_ADAPTER
Definition: rest_intern.h:47
Definition: rest.c:53
static const char *const HPD_REST_KEY_URI
Definition: rest_intern.h:40
hpd_error_t hpd_rest_get_timestamp(const hpd_module_t *context, char *str)
Definition: rest.c:115
static const char *const HPD_REST_KEY_TIMESTAMP
Definition: rest_intern.h:50