Back to index

lightning-sunbird  0.9+nobinonly
icalderivedvalue.h
Go to the documentation of this file.
00001 /* -*- Mode: C -*- */
00002 /*======================================================================
00003   FILE: icalvalue.h
00004   CREATOR: eric 20 March 1999
00005 
00006 
00007   $Id: icalderivedvalue.h,v 1.5 2002/09/01 19:12:31 gray-john Exp $
00008   $Locker:  $
00009 
00010   
00011 
00012  (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
00013 
00014  This program is free software; you can redistribute it and/or modify
00015  it under the terms of either: 
00016 
00017     The LGPL as published by the Free Software Foundation, version
00018     2.1, available at: http://www.fsf.org/copyleft/lesser.html
00019 
00020   Or:
00021 
00022     The Mozilla Public License Version 1.0. You may obtain a copy of
00023     the License at http://www.mozilla.org/MPL/
00024 
00025   The original code is icalvalue.h
00026 
00027   ======================================================================*/
00028 
00029 #ifndef ICALDERIVEDVALUE_H
00030 #define ICALDERIVEDVALUE_H
00031 
00032 #include "icaltypes.h"
00033 #include "icalrecur.h"
00034 #include "icaltime.h"
00035 #include "icalduration.h"
00036 #include "icalperiod.h"
00037 #include "icalattach.h"
00038      
00039 typedef struct icalvalue_impl icalvalue;
00040 
00041 
00042 
00043 void icalvalue_set_x(icalvalue* value, const char* v);
00044 icalvalue* icalvalue_new_x(const char* v);
00045 const char* icalvalue_get_x(const icalvalue* value);
00046 
00047 icalvalue* icalvalue_new_recur (struct icalrecurrencetype v);
00048 void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
00049 struct icalrecurrencetype icalvalue_get_recur(const icalvalue* value);
00050 
00051 icalvalue* icalvalue_new_trigger (struct icaltriggertype v);
00052 void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v);
00053 struct icaltriggertype icalvalue_get_trigger(const icalvalue* value);
00054 
00055 icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v);
00056 void icalvalue_set_datetimeperiod(icalvalue* value, struct icaldatetimeperiodtype v);
00057 struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* value);
00058 
00059 icalvalue *icalvalue_new_attach (icalattach *attach);
00060 void icalvalue_set_attach (icalvalue *value, icalattach *attach);
00061 icalattach *icalvalue_get_attach (const icalvalue *value);
00062 
00063 void icalvalue_reset_kind(icalvalue* value);
00064 
00065 typedef enum icalvalue_kind {
00066    ICAL_ANY_VALUE=5000,
00067     ICAL_BOOLEAN_VALUE=5001,
00068     ICAL_UTCOFFSET_VALUE=5002,
00069     ICAL_XLICCLASS_VALUE=5003,
00070     ICAL_RECUR_VALUE=5004,
00071     ICAL_METHOD_VALUE=5005,
00072     ICAL_CALADDRESS_VALUE=5006,
00073     ICAL_PERIOD_VALUE=5007,
00074     ICAL_STATUS_VALUE=5008,
00075     ICAL_BINARY_VALUE=5009,
00076     ICAL_TEXT_VALUE=5010,
00077     ICAL_DURATION_VALUE=5011,
00078     ICAL_DATETIMEPERIOD_VALUE=5012,
00079     ICAL_INTEGER_VALUE=5013,
00080     ICAL_URI_VALUE=5014,
00081     ICAL_TRIGGER_VALUE=5015,
00082     ICAL_ATTACH_VALUE=5016,
00083     ICAL_CLASS_VALUE=5017,
00084     ICAL_FLOAT_VALUE=5018,
00085     ICAL_QUERY_VALUE=5019,
00086     ICAL_STRING_VALUE=5020,
00087     ICAL_TRANSP_VALUE=5021,
00088     ICAL_X_VALUE=5022,
00089     ICAL_DATETIME_VALUE=5023,
00090     ICAL_REQUESTSTATUS_VALUE=5024,
00091     ICAL_GEO_VALUE=5025,
00092     ICAL_DATE_VALUE=5026,
00093     ICAL_ACTION_VALUE=5027,
00094    ICAL_NO_VALUE=5028
00095 } icalvalue_kind ;
00096 
00097 #define ICALPROPERTY_FIRST_ENUM 10000
00098 
00099 typedef enum icalproperty_action {
00100     ICAL_ACTION_X = 10000,
00101     ICAL_ACTION_AUDIO = 10001,
00102     ICAL_ACTION_DISPLAY = 10002,
00103     ICAL_ACTION_EMAIL = 10003,
00104     ICAL_ACTION_PROCEDURE = 10004,
00105     ICAL_ACTION_NONE = 10005
00106 } icalproperty_action;
00107 
00108 typedef enum icalproperty_class {
00109     ICAL_CLASS_X = 10006,
00110     ICAL_CLASS_PUBLIC = 10007,
00111     ICAL_CLASS_PRIVATE = 10008,
00112     ICAL_CLASS_CONFIDENTIAL = 10009,
00113     ICAL_CLASS_NONE = 10010
00114 } icalproperty_class;
00115 
00116 typedef enum icalproperty_method {
00117     ICAL_METHOD_X = 10011,
00118     ICAL_METHOD_PUBLISH = 10012,
00119     ICAL_METHOD_REQUEST = 10013,
00120     ICAL_METHOD_REPLY = 10014,
00121     ICAL_METHOD_ADD = 10015,
00122     ICAL_METHOD_CANCEL = 10016,
00123     ICAL_METHOD_REFRESH = 10017,
00124     ICAL_METHOD_COUNTER = 10018,
00125     ICAL_METHOD_DECLINECOUNTER = 10019,
00126     ICAL_METHOD_CREATE = 10020,
00127     ICAL_METHOD_READ = 10021,
00128     ICAL_METHOD_RESPONSE = 10022,
00129     ICAL_METHOD_MOVE = 10023,
00130     ICAL_METHOD_MODIFY = 10024,
00131     ICAL_METHOD_GENERATEUID = 10025,
00132     ICAL_METHOD_DELETE = 10026,
00133     ICAL_METHOD_NONE = 10027
00134 } icalproperty_method;
00135 
00136 typedef enum icalproperty_status {
00137     ICAL_STATUS_X = 10028,
00138     ICAL_STATUS_TENTATIVE = 10029,
00139     ICAL_STATUS_CONFIRMED = 10030,
00140     ICAL_STATUS_COMPLETED = 10031,
00141     ICAL_STATUS_NEEDSACTION = 10032,
00142     ICAL_STATUS_CANCELLED = 10033,
00143     ICAL_STATUS_INPROCESS = 10034,
00144     ICAL_STATUS_DRAFT = 10035,
00145     ICAL_STATUS_FINAL = 10036,
00146     ICAL_STATUS_NONE = 10037
00147 } icalproperty_status;
00148 
00149 typedef enum icalproperty_transp {
00150     ICAL_TRANSP_X = 10038,
00151     ICAL_TRANSP_OPAQUE = 10039,
00152     ICAL_TRANSP_OPAQUENOCONFLICT = 10040,
00153     ICAL_TRANSP_TRANSPARENT = 10041,
00154     ICAL_TRANSP_TRANSPARENTNOCONFLICT = 10042,
00155     ICAL_TRANSP_NONE = 10043
00156 } icalproperty_transp;
00157 
00158 typedef enum icalproperty_xlicclass {
00159     ICAL_XLICCLASS_X = 10044,
00160     ICAL_XLICCLASS_PUBLISHNEW = 10045,
00161     ICAL_XLICCLASS_PUBLISHUPDATE = 10046,
00162     ICAL_XLICCLASS_PUBLISHFREEBUSY = 10047,
00163     ICAL_XLICCLASS_REQUESTNEW = 10048,
00164     ICAL_XLICCLASS_REQUESTUPDATE = 10049,
00165     ICAL_XLICCLASS_REQUESTRESCHEDULE = 10050,
00166     ICAL_XLICCLASS_REQUESTDELEGATE = 10051,
00167     ICAL_XLICCLASS_REQUESTNEWORGANIZER = 10052,
00168     ICAL_XLICCLASS_REQUESTFORWARD = 10053,
00169     ICAL_XLICCLASS_REQUESTSTATUS = 10054,
00170     ICAL_XLICCLASS_REQUESTFREEBUSY = 10055,
00171     ICAL_XLICCLASS_REPLYACCEPT = 10056,
00172     ICAL_XLICCLASS_REPLYDECLINE = 10057,
00173     ICAL_XLICCLASS_REPLYDELEGATE = 10058,
00174     ICAL_XLICCLASS_REPLYCRASHERACCEPT = 10059,
00175     ICAL_XLICCLASS_REPLYCRASHERDECLINE = 10060,
00176     ICAL_XLICCLASS_ADDINSTANCE = 10061,
00177     ICAL_XLICCLASS_CANCELEVENT = 10062,
00178     ICAL_XLICCLASS_CANCELINSTANCE = 10063,
00179     ICAL_XLICCLASS_CANCELALL = 10064,
00180     ICAL_XLICCLASS_REFRESH = 10065,
00181     ICAL_XLICCLASS_COUNTER = 10066,
00182     ICAL_XLICCLASS_DECLINECOUNTER = 10067,
00183     ICAL_XLICCLASS_MALFORMED = 10068,
00184     ICAL_XLICCLASS_OBSOLETE = 10069,
00185     ICAL_XLICCLASS_MISSEQUENCED = 10070,
00186     ICAL_XLICCLASS_UNKNOWN = 10071,
00187     ICAL_XLICCLASS_NONE = 10072
00188 } icalproperty_xlicclass;
00189 
00190 #define ICALPROPERTY_LAST_ENUM 10073
00191 
00192 
00193  /* BOOLEAN */ 
00194 icalvalue* icalvalue_new_boolean(int v); 
00195 int icalvalue_get_boolean(const icalvalue* value); 
00196 void icalvalue_set_boolean(icalvalue* value, int v);
00197 
00198 
00199  /* UTC-OFFSET */ 
00200 icalvalue* icalvalue_new_utcoffset(int v); 
00201 int icalvalue_get_utcoffset(const icalvalue* value); 
00202 void icalvalue_set_utcoffset(icalvalue* value, int v);
00203 
00204 
00205  /* X-LIC-CLASS */ 
00206 icalvalue* icalvalue_new_xlicclass(enum icalproperty_xlicclass v); 
00207 enum icalproperty_xlicclass icalvalue_get_xlicclass(const icalvalue* value); 
00208 void icalvalue_set_xlicclass(icalvalue* value, enum icalproperty_xlicclass v);
00209 
00210 
00211  /* METHOD */ 
00212 icalvalue* icalvalue_new_method(enum icalproperty_method v); 
00213 enum icalproperty_method icalvalue_get_method(const icalvalue* value); 
00214 void icalvalue_set_method(icalvalue* value, enum icalproperty_method v);
00215 
00216 
00217  /* CAL-ADDRESS */ 
00218 icalvalue* icalvalue_new_caladdress(const char* v); 
00219 const char* icalvalue_get_caladdress(const icalvalue* value); 
00220 void icalvalue_set_caladdress(icalvalue* value, const char* v);
00221 
00222 
00223  /* PERIOD */ 
00224 icalvalue* icalvalue_new_period(struct icalperiodtype v); 
00225 struct icalperiodtype icalvalue_get_period(const icalvalue* value); 
00226 void icalvalue_set_period(icalvalue* value, struct icalperiodtype v);
00227 
00228 
00229  /* STATUS */ 
00230 icalvalue* icalvalue_new_status(enum icalproperty_status v); 
00231 enum icalproperty_status icalvalue_get_status(const icalvalue* value); 
00232 void icalvalue_set_status(icalvalue* value, enum icalproperty_status v);
00233 
00234 
00235  /* BINARY */ 
00236 icalvalue* icalvalue_new_binary(const char* v); 
00237 const char* icalvalue_get_binary(const icalvalue* value); 
00238 void icalvalue_set_binary(icalvalue* value, const char* v);
00239 
00240 
00241  /* TEXT */ 
00242 icalvalue* icalvalue_new_text(const char* v); 
00243 const char* icalvalue_get_text(const icalvalue* value); 
00244 void icalvalue_set_text(icalvalue* value, const char* v);
00245 
00246 
00247  /* DURATION */ 
00248 icalvalue* icalvalue_new_duration(struct icaldurationtype v); 
00249 struct icaldurationtype icalvalue_get_duration(const icalvalue* value); 
00250 void icalvalue_set_duration(icalvalue* value, struct icaldurationtype v);
00251 
00252 
00253  /* INTEGER */ 
00254 icalvalue* icalvalue_new_integer(int v); 
00255 int icalvalue_get_integer(const icalvalue* value); 
00256 void icalvalue_set_integer(icalvalue* value, int v);
00257 
00258 
00259  /* URI */ 
00260 icalvalue* icalvalue_new_uri(const char* v); 
00261 const char* icalvalue_get_uri(const icalvalue* value); 
00262 void icalvalue_set_uri(icalvalue* value, const char* v);
00263 
00264 
00265  /* CLASS */ 
00266 icalvalue* icalvalue_new_class(enum icalproperty_class v); 
00267 enum icalproperty_class icalvalue_get_class(const icalvalue* value); 
00268 void icalvalue_set_class(icalvalue* value, enum icalproperty_class v);
00269 
00270 
00271  /* FLOAT */ 
00272 icalvalue* icalvalue_new_float(float v); 
00273 float icalvalue_get_float(const icalvalue* value); 
00274 void icalvalue_set_float(icalvalue* value, float v);
00275 
00276 
00277  /* QUERY */ 
00278 icalvalue* icalvalue_new_query(const char* v); 
00279 const char* icalvalue_get_query(const icalvalue* value); 
00280 void icalvalue_set_query(icalvalue* value, const char* v);
00281 
00282 
00283  /* STRING */ 
00284 icalvalue* icalvalue_new_string(const char* v); 
00285 const char* icalvalue_get_string(const icalvalue* value); 
00286 void icalvalue_set_string(icalvalue* value, const char* v);
00287 
00288 
00289  /* TRANSP */ 
00290 icalvalue* icalvalue_new_transp(enum icalproperty_transp v); 
00291 enum icalproperty_transp icalvalue_get_transp(const icalvalue* value); 
00292 void icalvalue_set_transp(icalvalue* value, enum icalproperty_transp v);
00293 
00294 
00295  /* DATE-TIME */ 
00296 icalvalue* icalvalue_new_datetime(struct icaltimetype v); 
00297 struct icaltimetype icalvalue_get_datetime(const icalvalue* value); 
00298 void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v);
00299 
00300 
00301  /* REQUEST-STATUS */ 
00302 icalvalue* icalvalue_new_requeststatus(struct icalreqstattype v); 
00303 struct icalreqstattype icalvalue_get_requeststatus(const icalvalue* value); 
00304 void icalvalue_set_requeststatus(icalvalue* value, struct icalreqstattype v);
00305 
00306 
00307  /* GEO */ 
00308 icalvalue* icalvalue_new_geo(struct icalgeotype v); 
00309 struct icalgeotype icalvalue_get_geo(const icalvalue* value); 
00310 void icalvalue_set_geo(icalvalue* value, struct icalgeotype v);
00311 
00312 
00313  /* DATE */ 
00314 icalvalue* icalvalue_new_date(struct icaltimetype v); 
00315 struct icaltimetype icalvalue_get_date(const icalvalue* value); 
00316 void icalvalue_set_date(icalvalue* value, struct icaltimetype v);
00317 
00318 
00319  /* ACTION */ 
00320 icalvalue* icalvalue_new_action(enum icalproperty_action v); 
00321 enum icalproperty_action icalvalue_get_action(const icalvalue* value); 
00322 void icalvalue_set_action(icalvalue* value, enum icalproperty_action v);
00323 
00324 #endif /*ICALVALUE_H*/