aDTN lib  0.2
 All Data Structures Files Functions Variables
rit.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2014 SeNDA
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17 
19 #ifndef INC_COMMON_RIT
20 #define INC_COMMON_RIT
21 
44 //rit.h
45 
47 typedef struct{
48  int transaction;
49 }transaction_args;
53 /* VARIABLE FUNCTIONS */
54 #ifndef DOX
55 #define rit_set(path, value, ...) rit_var_set(path, value, ##__VA_ARGS__)
56 #define rit_unset(path, ...) rit_var_unset(path, ##__VA_ARGS__)
57 #define rit_tag(path, name, value, ...) rit_var_tag(path, name, value, ##__VA_ARGS__)
58 #define rit_untag(path, name, ...) rit_var_untag(path, name, ##__VA_ARGS__)
59 #define rit_clear(path, ...) rit_var_clear(path, ##__VA_ARGS__)
60 #define rit_delete(path, ...) rit_var_delete(path, ##__VA_ARGS__)
61 #endif
62 
64 #ifdef DOX
65 int rit_set(const char* path, const char* value);
66 int rit_unset(const char* path);
67 int rit_tag(const char* path, const char* name, const char* value);
68 int rit_untag(const char* path, const char* name);
70 int rit_clear(const char* path);
71 int rit_delete(const char* path);
73 #endif
74 
76 int rit_var_set(const char* path, const char* value, ...);
77 int rit_var_unset(const char* path, ...);
78 int rit_var_tag(const char* path, const char* name, const char* value, ...);
79 int rit_var_untag(const char* path, const char* name, ...);
80 int rit_var_clear(const char* path, ...);
81 int rit_var_delete(const char *path, ...);
85 int rit_changePath(const char *newPath);
86 void rit_drop();
87 int rit_start();
88 int rit_commit();
89 int rit_rollback();
92 char* rit_getValue(const char *path);
93 char* rit_getTag(const char *path, const char *nom);
94 
96 char* rit_getPathsByTag(const char *nom, const char* value);
97 char* rit_getTagNamesByPath(const char *path);
98 char* rit_getChilds(const char *path);
102 #endif
103 
int rit_set(const char *path, const char *value)
Sets a path with the given value.
int rit_unset(const char *path)
int rit_untag(const char *path, const char *name)
This function removes a tag.
char * rit_getTag(const char *path, const char *nom)
This functions gets the value of the tag into the given path.
char * rit_getValue(const char *path)
This functions gets the value of the given path.
int rit_tag(const char *path, const char *name, const char *value)
This function adds a tag to the given path with the given value.