~ubuntu-branches/ubuntu/maverick/ekiga/maverick

« back to all changes in this revision

Viewing changes to lib/gmcontacts/e-vcard.h

  • Committer: Bazaar Package Importer
  • Author(s): Eugen Dedu, Eugen Dedu, Loic Minier
  • Date: 2008-09-27 10:00:00 UTC
  • mfrom: (1.1.8 upstream)
  • mto: (1.4.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20080927100000-l5k5werb6czr5b3h
Tags: 3.0.1-1
[ Eugen Dedu ]
* New version.  (Closes: #500089).
* Add our own changelog file in /usr/share/doc.
* Remove gnomemeeting transitional package.
* Discover new interfaces.  (Closes: #488199).
* Compile with dbus support.  (Closes: #467212).
* Numeric keypad inserts digits at correct position.  (Closes: #440159).
* Use libnotify upon call.  (Closes: #412604).
* Symlink identical GNOME help files, to reduce size.  (Closes: #505536).
* Explicitely build-depends on a few dev packages, even if they were
  pulled out anyway by the other dependencies.

[ Loic Minier ]
* Use clean:: instead of clean: in rules.
* Don't disable Uploaders: generation for control.in -> control generation
  in rules.
* Fix some tabs which were size 4 anyway.
* Generate a PO template during build by calling intltool-update -p in
  install; thanks Ubuntu and Martin Pitt; closes: #505535.
* Also let the -dbg depend on ${misc:Depends}.
* Cleanup rules; in particular, use dpkg-parsechangelog and honor
  distclean/clean failures, remove old clean rules, commented out stuff,
  gtk-only stuff.
* Pass -s to dh_* in binary-arch.
* Use debian/*.links and debian/*.manpages instead of symlink manually or
  passing files to dh_installman.
* Use ftp.gnome.org in copyright.
* Switch to quilt and fix target deps in the process; build-dep on quilt
  instead of dpatch; rename news.dpatch to 00_news.patch and refresh;
  replace 00list with series.
* Install autotools-dev config.guess and .sub after patching.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
 
/* e-vcard.h
3
 
 *
4
 
 * Copyright (C) 2003 Ximian, Inc.
5
 
 *
6
 
 * This program is free software; you can redistribute it and/or
7
 
 * modify it under the terms of version 2 of the GNU General Public
8
 
 * License as published by the Free Software Foundation.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 
 * General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public
16
 
 * License along with this program; if not, write to the
17
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
 
 * Boston, MA 02111-1307, USA.
19
 
 *
20
 
 * Author: Chris Toshok (toshok@ximian.com)
21
 
 */
22
 
 
23
 
#ifndef _EVCARD_H
24
 
#define _EVCARD_H
25
 
 
26
 
#include <glib.h>
27
 
#include <glib-object.h>
28
 
 
29
 
G_BEGIN_DECLS
30
 
 
31
 
#define EVC_ADR             "ADR"
32
 
#define EVC_BDAY            "BDAY"
33
 
#define EVC_CALURI          "CALURI"
34
 
#define EVC_CATEGORIES      "CATEGORIES"
35
 
#define EVC_EMAIL           "EMAIL"
36
 
#define EVC_ENCODING        "ENCODING"
37
 
#define EVC_FBURL           "FBURL"
38
 
#define EVC_FN              "FN"
39
 
#define EVC_ICSCALENDAR     "ICSCALENDAR" /* XXX should this be X-EVOLUTION-ICSCALENDAR? */
40
 
#define EVC_KEY             "KEY"
41
 
#define EVC_LABEL           "LABEL"
42
 
#define EVC_LOGO            "LOGO"
43
 
#define EVC_MAILER          "MAILER"
44
 
#define EVC_NICKNAME        "NICKNAME"
45
 
#define EVC_N               "N"
46
 
#define EVC_NOTE            "NOTE"
47
 
#define EVC_ORG             "ORG"
48
 
#define EVC_PHOTO           "PHOTO"
49
 
#define EVC_PRODID          "PRODID"
50
 
#define EVC_QUOTEDPRINTABLE "QUOTED-PRINTABLE"
51
 
#define EVC_REV             "REV"
52
 
#define EVC_ROLE            "ROLE"
53
 
#define EVC_TEL             "TEL"
54
 
#define EVC_TITLE           "TITLE"
55
 
#define EVC_TYPE            "TYPE"
56
 
#define EVC_UID             "UID"
57
 
#define EVC_URL             "URL"
58
 
#define EVC_VALUE           "VALUE"
59
 
#define EVC_VERSION         "VERSION"
60
 
 
61
 
#define EVC_X_AIM              "X-AIM"
62
 
#define EVC_X_ANNIVERSARY      "X-EVOLUTION-ANNIVERSARY"
63
 
#define EVC_X_ASSISTANT        "X-EVOLUTION-ASSISTANT"
64
 
#define EVC_X_BIRTHDAY         "X-EVOLUTION-BIRTHDAY"
65
 
#define EVC_X_BLOG_URL         "X-EVOLUTION-BLOG-URL"
66
 
#define EVC_X_CALLBACK         "X-EVOLUTION-CALLBACK"
67
 
#define EVC_X_COMPANY          "X-EVOLUTION-COMPANY"
68
 
#define EVC_X_DEST_CONTACT_UID "X-EVOLUTION-DEST-CONTACT-UID"
69
 
#define EVC_X_DEST_EMAIL       "X-EVOLUTION-DEST-EMAIL"
70
 
#define EVC_X_DEST_EMAIL_NUM   "X-EVOLUTION-DEST-EMAIL-NUM"
71
 
#define EVC_X_DEST_HTML_MAIL   "X-EVOLUTION-DEST-HTML-MAIL"
72
 
#define EVC_X_DEST_NAME        "X-EVOLUTION-DEST-NAME"
73
 
#define EVC_X_DEST_SOURCE_UID  "X-EVOLUTION-DEST-SOURCE-UID"
74
 
#define EVC_X_FILE_AS          "X-EVOLUTION-FILE-AS"
75
 
#define EVC_X_ICQ              "X-ICQ"
76
 
#define EVC_X_JABBER           "X-JABBER"
77
 
#define EVC_X_LIST_SHOW_ADDRESSES "X-EVOLUTION-LIST-SHOW_ADDRESSES"
78
 
#define EVC_X_LIST              "X-EVOLUTION-LIST"
79
 
#define EVC_X_MANAGER           "X-EVOLUTION-MANAGER"
80
 
#define EVC_X_MSN               "X-MSN"
81
 
#define EVC_X_RADIO             "X-EVOLUTION-RADIO"
82
 
#define EVC_X_SPOUSE            "X-EVOLUTION-SPOUSE"
83
 
#define EVC_X_TELEX             "X-EVOLUTION-TELEX"
84
 
#define EVC_X_TTYTDD            "X-EVOLUTION-TTYTDD"
85
 
#define EVC_X_VIDEO_URL         "X-EVOLUTION-VIDEO-URL"
86
 
#define EVC_X_WANTS_HTML        "X-MOZILLA-HTML"
87
 
#define EVC_X_YAHOO             "X-YAHOO"
88
 
#define EVC_X_GROUPWISE         "X-GROUPWISE"
89
 
 
90
 
typedef enum {
91
 
        EVC_FORMAT_VCARD_21,
92
 
        EVC_FORMAT_VCARD_30
93
 
} EVCardFormat;
94
 
 
95
 
#define E_TYPE_VCARD            (e_vcard_get_type ())
96
 
#define E_VCARD(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_VCARD, EVCard))
97
 
#define E_VCARD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_VCARD, EVCardClass))
98
 
#define E_IS_VCARD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_VCARD))
99
 
#define E_IS_VCARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_VCARD))
100
 
#define E_VCARD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_VCARD, EVCardClass))
101
 
 
102
 
typedef struct _EVCard EVCard;
103
 
typedef struct _EVCardClass EVCardClass;
104
 
typedef struct _EVCardPrivate EVCardPrivate;
105
 
typedef struct _EVCardAttribute EVCardAttribute;
106
 
typedef struct _EVCardAttributeParam EVCardAttributeParam;
107
 
 
108
 
struct _EVCard {
109
 
        GObject parent;
110
 
        /*< private >*/
111
 
        EVCardPrivate *priv;
112
 
};
113
 
 
114
 
struct _EVCardClass {
115
 
        GObjectClass parent_class;
116
 
 
117
 
        /* Padding for future expansion */
118
 
        void (*_ebook_reserved0) (void);
119
 
        void (*_ebook_reserved1) (void);
120
 
        void (*_ebook_reserved2) (void);
121
 
        void (*_ebook_reserved3) (void);
122
 
        void (*_ebook_reserved4) (void);
123
 
};
124
 
 
125
 
GType   e_vcard_get_type                     (void);
126
 
 
127
 
void    e_vcard_construct                    (EVCard *evc, const char *str);
128
 
EVCard* e_vcard_new                          (void);
129
 
EVCard* e_vcard_new_from_string              (const char *str);
130
 
 
131
 
char*   e_vcard_to_string                    (EVCard *evc, EVCardFormat format);
132
 
 
133
 
/* mostly for debugging */
134
 
void    e_vcard_dump_structure               (EVCard *evc);
135
 
 
136
 
 
137
 
/* attributes */
138
 
EVCardAttribute *e_vcard_attribute_new               (const char *attr_group, const char *attr_name);
139
 
void             e_vcard_attribute_free              (EVCardAttribute *attr);
140
 
EVCardAttribute *e_vcard_attribute_copy              (EVCardAttribute *attr);
141
 
void             e_vcard_remove_attributes           (EVCard *evcard, const char *attr_group, const char *attr_name);
142
 
void             e_vcard_remove_attribute            (EVCard *evcard, EVCardAttribute *attr);
143
 
void             e_vcard_add_attribute               (EVCard *evcard, EVCardAttribute *attr);
144
 
void             e_vcard_add_attribute_with_value    (EVCard *evcard, EVCardAttribute *attr, const char *value);
145
 
void             e_vcard_add_attribute_with_values   (EVCard *evcard, EVCardAttribute *attr, ...);
146
 
void             e_vcard_attribute_add_value         (EVCardAttribute *attr, const char *value);
147
 
void             e_vcard_attribute_add_value_decoded (EVCardAttribute *attr, const char *value, int len);
148
 
void             e_vcard_attribute_add_values        (EVCardAttribute *attr, ...);
149
 
void             e_vcard_attribute_remove_values     (EVCardAttribute *attr);
150
 
void             e_vcard_attribute_remove_params     (EVCardAttribute *attr);
151
 
 
152
 
/* attribute parameters */
153
 
EVCardAttributeParam* e_vcard_attribute_param_new             (const char *param_name);
154
 
void                  e_vcard_attribute_param_free            (EVCardAttributeParam *param);
155
 
EVCardAttributeParam* e_vcard_attribute_param_copy            (EVCardAttributeParam *param);
156
 
void                  e_vcard_attribute_add_param             (EVCardAttribute *attr, EVCardAttributeParam *param);
157
 
void                  e_vcard_attribute_add_param_with_value  (EVCardAttribute *attr,
158
 
                                                               EVCardAttributeParam *param, const char *value);
159
 
void                  e_vcard_attribute_add_param_with_values (EVCardAttribute *attr,
160
 
                                                               EVCardAttributeParam *param, ...);
161
 
 
162
 
void                  e_vcard_attribute_param_add_value       (EVCardAttributeParam *param,
163
 
                                                               const char *value);
164
 
void                  e_vcard_attribute_param_add_values      (EVCardAttributeParam *param,
165
 
                                                               ...);
166
 
void                  e_vcard_attribute_param_remove_values   (EVCardAttributeParam *param);
167
 
 
168
 
/* EVCard* accessors.  nothing returned from these functions should be
169
 
   freed by the caller. */
170
 
GList*           e_vcard_get_attributes       (EVCard *evcard);
171
 
const char*      e_vcard_attribute_get_group  (EVCardAttribute *attr);
172
 
const char*      e_vcard_attribute_get_name   (EVCardAttribute *attr);
173
 
GList*           e_vcard_attribute_get_values (EVCardAttribute *attr);  /* GList elements are of type char* */
174
 
GList*           e_vcard_attribute_get_values_decoded (EVCardAttribute *attr); /* GList elements are of type GString* */
175
 
 
176
 
/* special accessors for single valued attributes */
177
 
gboolean              e_vcard_attribute_is_single_valued      (EVCardAttribute *attr);
178
 
char*                 e_vcard_attribute_get_value             (EVCardAttribute *attr);
179
 
GString*              e_vcard_attribute_get_value_decoded     (EVCardAttribute *attr);
180
 
 
181
 
GList*           e_vcard_attribute_get_params       (EVCardAttribute *attr);
182
 
const char*      e_vcard_attribute_param_get_name   (EVCardAttributeParam *param);
183
 
GList*           e_vcard_attribute_param_get_values (EVCardAttributeParam *param);
184
 
 
185
 
/* special TYPE= parameter predicate (checks for TYPE=@typestr */
186
 
gboolean         e_vcard_attribute_has_type         (EVCardAttribute *attr, const char *typestr);
187
 
 
188
 
/* Utility functions. */
189
 
char*            e_vcard_escape_string (const char *str);
190
 
char*            e_vcard_unescape_string (const char *str);
191
 
 
192
 
G_END_DECLS
193
 
 
194
 
#endif /* _EVCARD_H */