blob: 678adaa2995e649793efaaaecb7c63904d937f8b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/* -*- Mode: C -*- */
/*======================================================================
FILE: icalbdbset_cxx.h
CREATOR: dml 12/12/01
(C) COPYRIGHT 2001, Critical Path
======================================================================*/
#ifndef ICALBDBSET_CXX_H
#define ICALBDBSET_CXX_H
extern "C" {
#include "ical.h"
#include "icalgauge.h"
}
#include "vcomponent.h"
#include <db_cxx.h>
typedef char* string; // Will use the string library from STL
class ICalBDBSet {
public:
ICalBDBSet();
ICalBDBSet(const ICalBDBSet&);
ICalBDBSet operator=(const ICalBDBSet &);
~ICalBDBSet();
ICalBDBSet(const string& path, int flags);
public:
void free();
string path();
icalerrorenum add_component(VComponent* child);
icalerrorenum remove_component(VComponent* child);
int count_components(icalcomponent_kind kind);
// Restrict the component returned by icalbdbset_first, _next to those
// that pass the gauge. _clear removes the gauge
icalerrorenum select(icalgauge *gauge);
void clear();
// Get and search for a component by uid
VComponent* fetch(string &uid);
VComponent* fetch_match(icalcomponent *c);
int has_uid(string &uid);
// Iterate through components. If a guage has been defined, these
// will skip over components that do not pass the gauge
VComponent* get_current_component();
VComponent* get_first_component();
VComponent* get_next_component();
VComponent* get_component();
};
#endif
|