~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to servers/exchange/lib/e2k-properties.h

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2
 
/* Copyright (C) 2001-2004 Novell, Inc. */
3
 
 
4
 
#ifndef __E2K_PROPERTIES_H__
5
 
#define __E2K_PROPERTIES_H__
6
 
 
7
 
#include <glib.h>
8
 
#include <libxml/tree.h>
9
 
 
10
 
typedef struct E2kProperties E2kProperties;
11
 
 
12
 
typedef enum {
13
 
        E2K_PROP_TYPE_UNKNOWN,
14
 
 
15
 
        E2K_PROP_TYPE_STRING,
16
 
        E2K_PROP_TYPE_BINARY,
17
 
        E2K_PROP_TYPE_STRING_ARRAY,
18
 
        E2K_PROP_TYPE_BINARY_ARRAY,
19
 
        E2K_PROP_TYPE_XML,
20
 
 
21
 
        /* These are all stored as STRING or STRING_ARRAY */
22
 
        E2K_PROP_TYPE_INT,
23
 
        E2K_PROP_TYPE_INT_ARRAY,
24
 
        E2K_PROP_TYPE_BOOL,
25
 
        E2K_PROP_TYPE_FLOAT,
26
 
        E2K_PROP_TYPE_DATE
27
 
} E2kPropType;
28
 
 
29
 
#define E2K_PROP_TYPE_IS_ARRAY(type) (((type) == E2K_PROP_TYPE_STRING_ARRAY) || ((type) == E2K_PROP_TYPE_BINARY_ARRAY) || ((type) == E2K_PROP_TYPE_INT_ARRAY))
30
 
 
31
 
E2kProperties *e2k_properties_new               (void);
32
 
E2kProperties *e2k_properties_copy              (E2kProperties *props);
33
 
void           e2k_properties_free              (E2kProperties *props);
34
 
 
35
 
gpointer       e2k_properties_get_prop          (E2kProperties *props,
36
 
                                                 const gchar    *propname);
37
 
gboolean       e2k_properties_empty             (E2kProperties *props);
38
 
 
39
 
void           e2k_properties_set_string        (E2kProperties *props,
40
 
                                                 const gchar    *propname,
41
 
                                                 gchar          *value);
42
 
void           e2k_properties_set_string_array  (E2kProperties *props,
43
 
                                                 const gchar    *propname,
44
 
                                                 GPtrArray     *value);
45
 
void           e2k_properties_set_binary        (E2kProperties *props,
46
 
                                                 const gchar    *propname,
47
 
                                                 GByteArray    *value);
48
 
void           e2k_properties_set_binary_array  (E2kProperties *props,
49
 
                                                 const gchar    *propname,
50
 
                                                 GPtrArray     *value);
51
 
void           e2k_properties_set_int           (E2kProperties *props,
52
 
                                                 const gchar    *propname,
53
 
                                                 gint            value);
54
 
void           e2k_properties_set_int_array     (E2kProperties *props,
55
 
                                                 const gchar    *propname,
56
 
                                                 GPtrArray     *value);
57
 
void           e2k_properties_set_xml           (E2kProperties *props,
58
 
                                                 const gchar    *propname,
59
 
                                                 xmlNode       *value);
60
 
void           e2k_properties_set_bool          (E2kProperties *props,
61
 
                                                 const gchar    *propname,
62
 
                                                 gboolean       value);
63
 
void           e2k_properties_set_float         (E2kProperties *props,
64
 
                                                 const gchar    *propname,
65
 
                                                 gfloat          value);
66
 
void           e2k_properties_set_date          (E2kProperties *props,
67
 
                                                 const gchar    *propname,
68
 
                                                 gchar          *value);
69
 
 
70
 
void           e2k_properties_set_type_as_string       (E2kProperties *props,
71
 
                                                        const gchar    *propname,
72
 
                                                        E2kPropType    type,
73
 
                                                        gchar          *value);
74
 
void           e2k_properties_set_type_as_string_array (E2kProperties *props,
75
 
                                                        const gchar    *propname,
76
 
                                                        E2kPropType    type,
77
 
                                                        GPtrArray     *value);
78
 
 
79
 
void           e2k_properties_remove            (E2kProperties *props,
80
 
                                                 const gchar    *propname);
81
 
 
82
 
typedef void (*E2kPropertiesForeachFunc)        (const gchar    *propname,
83
 
                                                 E2kPropType    type,
84
 
                                                 gpointer       value,
85
 
                                                 gpointer       user_data);
86
 
void           e2k_properties_foreach           (E2kProperties *props,
87
 
                                                 E2kPropertiesForeachFunc callback,
88
 
                                                 gpointer       user_data);
89
 
void           e2k_properties_foreach_removed   (E2kProperties *props,
90
 
                                                 E2kPropertiesForeachFunc callback,
91
 
                                                 gpointer       user_data);
92
 
 
93
 
typedef void(*E2kPropertiesForeachNamespaceFunc)(const gchar    *namespace,
94
 
                                                 gchar           abbrev,
95
 
                                                 gpointer       user_data);
96
 
void           e2k_properties_foreach_namespace (E2kProperties *props,
97
 
                                                 E2kPropertiesForeachNamespaceFunc callback,
98
 
                                                 gpointer user_data);
99
 
 
100
 
const gchar *e2k_prop_namespace_name   (const gchar *prop);
101
 
gchar        e2k_prop_namespace_abbrev (const gchar *prop);
102
 
const gchar *e2k_prop_property_name    (const gchar *prop);
103
 
 
104
 
guint32     e2k_prop_proptag          (const gchar *prop);
105
 
const gchar *e2k_proptag_prop          (guint32     proptag);
106
 
 
107
 
#define E2K_PROPTAG_TYPE(proptag) (proptag & 0xFFFF)
108
 
#define E2K_PROPTAG_ID(proptag) (proptag & 0xFFFF0000)
109
 
 
110
 
#define E2K_PT_SHORT    0x0002
111
 
#define E2K_PT_LONG     0x0003
112
 
#define E2K_PT_ERROR    0x000a
113
 
#define E2K_PT_BOOLEAN  0x000b
114
 
#define E2K_PT_OBJECT   0x000d
115
 
#define E2K_PT_LONGLONG 0x0014
116
 
#define E2K_PT_STRING8  0x001e
117
 
#define E2K_PT_UNICODE  0x001f
118
 
#define E2K_PT_SYSTIME  0x0040
119
 
#define E2K_PT_BINARY   0x0102
120
 
 
121
 
#endif /* __E2K_PROPERTIES_H__ */