aboutsummaryrefslogtreecommitdiff
path: root/vcal.h
diff options
context:
space:
mode:
Diffstat (limited to 'vcal.h')
-rw-r--r--vcal.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/vcal.h b/vcal.h
index 6b3667bf..08d706a6 100644
--- a/vcal.h
+++ b/vcal.h
@@ -29,6 +29,8 @@ INIT_F(content_line);
INIT_F(content_line, int keylen, int vallen);
FREE_F(content_line);
+int content_line_copy (content_line* dest, content_line* src);
+
/*
* Resolves a collision in some form of structure (probably a hash-map
* or a trie). If dest is NULL just return new. Otherwise mutates dest
@@ -50,17 +52,19 @@ typedef struct s_vcomponent vcomponent;
struct s_vcomponent {
char* filename;
+ char* type;
vcomponent* parent;
TRIE(content_line) clines;
VECT(vcomponent) components;
};
+#define FCHILD(v) GET(VECT(vcomponent))(&(v)->components, 0)
+
INIT_F(vcomponent);
-INIT_F(vcomponent, char* filename);
+INIT_F(vcomponent, char* type);
+INIT_F(vcomponent, char* type, char* filename);
FREE_F(vcomponent);
-int content_line_copy (content_line* dest, content_line* src);
-
content_line* get_property (vcomponent* ev, char* key);
int add_content_line (vcomponent* ev, content_line* c);
@@ -71,4 +75,6 @@ int add_content_line (vcomponent* ev, content_line* c);
*/
int PUSH(vcomponent)(vcomponent*, vcomponent*);
+int DEEP_COPY(vcomponent)(vcomponent*, vcomponent*);
+
#endif /* VCAL_H */