ical.h 173 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323
  1. #ifndef LIBICAL_ICAL_H
  2. #define LIBICAL_ICAL_H
  3. #ifndef S_SPLINT_S
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #ifndef ICAL_VERSION_H
  8. #define ICAL_VERSION_H
  9. #define ICAL_PACKAGE "libical"
  10. #define ICAL_VERSION "2.0"
  11. #endif
  12. /*======================================================================
  13. FILE: icaltime.h
  14. CREATOR: eric 02 June 2000
  15. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  16. http://www.softwarestudio.org
  17. This program is free software; you can redistribute it and/or modify
  18. it under the terms of either:
  19. The LGPL as published by the Free Software Foundation, version
  20. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  21. Or:
  22. The Mozilla Public License Version 1.0. You may obtain a copy of
  23. the License at http://www.mozilla.org/MPL/
  24. The Original Code is eric. The Initial Developer of the Original
  25. Code is Eric Busboom
  26. ======================================================================*/
  27. /** @file icaltime.h
  28. * @brief struct icaltimetype is a pseudo-object that abstracts time
  29. * handling.
  30. *
  31. * It can represent either a DATE or a DATE-TIME (floating, UTC or in a
  32. * given timezone), and it keeps track internally of its native timezone.
  33. *
  34. * The typical usage is to call the correct constructor specifying the
  35. * desired timezone. If this is not known until a later time, the
  36. * correct behavior is to specify a NULL timezone and call
  37. * icaltime_convert_to_zone() at a later time.
  38. *
  39. * There are several ways to create a new icaltimetype:
  40. *
  41. * - icaltime_null_time()
  42. * - icaltime_null_date()
  43. * - icaltime_current_time_with_zone()
  44. * - icaltime_today()
  45. * - icaltime_from_timet_with_zone(time_t tm, int is_date,
  46. * icaltimezone *zone)
  47. * - icaltime_from_string_with_zone(const char* str, icaltimezone *zone)
  48. * - icaltime_from_day_of_year(int doy, int year)
  49. * - icaltime_from_week_number(int week_number, int year)
  50. *
  51. * italtimetype objects can be converted to different formats:
  52. *
  53. * - icaltime_as_timet(struct icaltimetype tt)
  54. * - icaltime_as_timet_with_zone(struct icaltimetype tt,
  55. * icaltimezone *zone)
  56. * - icaltime_as_ical_string(struct icaltimetype tt)
  57. *
  58. * Accessor methods include:
  59. *
  60. * - icaltime_get_timezone(struct icaltimetype t)
  61. * - icaltime_get_tzid(struct icaltimetype t)
  62. * - icaltime_set_timezone(struct icaltimetype t, const icaltimezone *zone)
  63. * - icaltime_day_of_year(struct icaltimetype t)
  64. * - icaltime_day_of_week(struct icaltimetype t)
  65. * - icaltime_start_doy_of_week(struct icaltimetype t, int fdow)
  66. * - icaltime_week_number(struct icaltimetype t)
  67. *
  68. * Query methods include:
  69. *
  70. * - icaltime_is_null_time(struct icaltimetype t)
  71. * - icaltime_is_valid_time(struct icaltimetype t)
  72. * - icaltime_is_date(struct icaltimetype t)
  73. * - icaltime_is_utc(struct icaltimetype t)
  74. *
  75. * Modify, compare and utility methods include:
  76. *
  77. * - icaltime_compare_with_zone(struct icaltimetype a,struct icaltimetype b)
  78. * - icaltime_compare(struct icaltimetype a,struct icaltimetype b)
  79. * - icaltime_compare_date_only(struct icaltimetype a,
  80. * struct icaltimetype b)
  81. * - icaltime_adjust(struct icaltimetype *tt, int days, int hours,
  82. * int minutes, int seconds);
  83. * - icaltime_normalize(struct icaltimetype t);
  84. * - icaltime_convert_to_zone(const struct icaltimetype tt,
  85. * icaltimezone *zone);
  86. */
  87. #ifndef ICALTIME_H
  88. #define ICALTIME_H
  89. #include "libical_ical_export.h"
  90. #include <time.h>
  91. /* An opaque struct representing a timezone. We declare this here to avoid
  92. a circular dependancy. */
  93. #if !defined(ICALTIMEZONE_DEFINED)
  94. #define ICALTIMEZONE_DEFINED
  95. typedef struct _icaltimezone icaltimezone;
  96. #endif
  97. /** icaltime_span is returned by icalcomponent_get_span() */
  98. struct icaltime_span
  99. {
  100. time_t start; /**< in UTC */
  101. time_t end; /**< in UTC */
  102. int is_busy; /**< 1->busy time, 0-> free time */
  103. };
  104. typedef struct icaltime_span icaltime_span;
  105. /*
  106. * FIXME
  107. *
  108. * is_utc is redundant, and might be considered a minor optimization.
  109. * It might be deprecated, so you should use icaltime_is_utc() instead.
  110. */
  111. struct icaltimetype
  112. {
  113. int year; /**< Actual year, e.g. 2001. */
  114. int month; /**< 1 (Jan) to 12 (Dec). */
  115. int day;
  116. int hour;
  117. int minute;
  118. int second;
  119. int is_utc; /**< 1-> time is in UTC timezone */
  120. int is_date; /**< 1 -> interpret this as date. */
  121. int is_daylight; /**< 1 -> time is in daylight savings time. */
  122. const icaltimezone *zone; /**< timezone */
  123. };
  124. typedef struct icaltimetype icaltimetype;
  125. /** Return a null time, which indicates no time has been set.
  126. This time represent the beginning of the epoch */
  127. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_null_time(void);
  128. /** Return a null date */
  129. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_null_date(void);
  130. /** Returns the current time in the given timezone, as an icaltimetype. */
  131. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_current_time_with_zone(const icaltimezone *zone);
  132. /** Returns the current day as an icaltimetype, with is_date set. */
  133. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_today(void);
  134. /** Convert seconds past UNIX epoch to a timetype*/
  135. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_timet(const time_t v, const int is_date);
  136. /** Convert seconds past UNIX epoch to a timetype, using timezones. */
  137. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_timet_with_zone(const time_t tm,
  138. const int is_date,
  139. const icaltimezone *zone);
  140. /** create a time from an ISO format string */
  141. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_string(const char *str);
  142. /** create a time from an ISO format string */
  143. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_string_with_zone(const char *str,
  144. const icaltimezone *zone);
  145. /** Create a new time, given a day of year and a year. */
  146. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_day_of_year(const int doy, const int year);
  147. /** @brief Contructor (TODO).
  148. * Create a new time from a weeknumber and a year. */
  149. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_week_number(const int week_number,
  150. const int year);
  151. /** Return the time as seconds past the UNIX epoch */
  152. LIBICAL_ICAL_EXPORT time_t icaltime_as_timet(const struct icaltimetype);
  153. /** Return the time as seconds past the UNIX epoch, using timezones. */
  154. LIBICAL_ICAL_EXPORT time_t icaltime_as_timet_with_zone(const struct icaltimetype tt,
  155. const icaltimezone *zone);
  156. /** Return a string represention of the time, in RFC5545 format. */
  157. LIBICAL_ICAL_EXPORT const char *icaltime_as_ical_string(const struct icaltimetype tt);
  158. LIBICAL_ICAL_EXPORT char *icaltime_as_ical_string_r(const struct icaltimetype tt);
  159. /** @brief Return the timezone */
  160. LIBICAL_ICAL_EXPORT const icaltimezone *icaltime_get_timezone(const struct icaltimetype t);
  161. /** @brief Return the tzid, or NULL for a floating time */
  162. LIBICAL_ICAL_EXPORT const char *icaltime_get_tzid(const struct icaltimetype t);
  163. /** @brief Set the timezone */
  164. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_set_timezone(struct icaltimetype *t,
  165. const icaltimezone *zone);
  166. /** Return the day of the year of the given time */
  167. LIBICAL_ICAL_EXPORT int icaltime_day_of_year(const struct icaltimetype t);
  168. /** Return the day of the week of the given time. Sunday is 1 */
  169. LIBICAL_ICAL_EXPORT int icaltime_day_of_week(const struct icaltimetype t);
  170. /** Return the day of the year for the Sunday of the week that the
  171. given time is within. */
  172. LIBICAL_ICAL_EXPORT int icaltime_start_doy_of_week(const struct icaltimetype t);
  173. /** Return the day of the year for the first day of the week that the
  174. given time is within. */
  175. LIBICAL_ICAL_EXPORT int icaltime_start_doy_week(const struct icaltimetype t, int fdow);
  176. /** Return the week number for the week the given time is within */
  177. LIBICAL_ICAL_EXPORT int icaltime_week_number(const struct icaltimetype t);
  178. /** Return true of the time is null. */
  179. LIBICAL_ICAL_EXPORT int icaltime_is_null_time(const struct icaltimetype t);
  180. /** Returns false if the time is clearly invalid, but is not null. This
  181. is usually the result of creating a new time type buy not clearing
  182. it, or setting one of the flags to an illegal value. */
  183. LIBICAL_ICAL_EXPORT int icaltime_is_valid_time(const struct icaltimetype t);
  184. /** @brief Returns true if time is of DATE type, false if DATE-TIME */
  185. LIBICAL_ICAL_EXPORT int icaltime_is_date(const struct icaltimetype t);
  186. /** @brief Returns true if time is relative to UTC zone */
  187. LIBICAL_ICAL_EXPORT int icaltime_is_utc(const struct icaltimetype t);
  188. /** Return -1, 0, or 1 to indicate that a<b, a==b or a>b */
  189. LIBICAL_ICAL_EXPORT int icaltime_compare_with_zone(const struct icaltimetype a,
  190. const struct icaltimetype b);
  191. /** Return -1, 0, or 1 to indicate that a<b, a==b or a>b */
  192. LIBICAL_ICAL_EXPORT int icaltime_compare(const struct icaltimetype a, const struct icaltimetype b);
  193. /** like icaltime_compare, but only use the date parts. */
  194. LIBICAL_ICAL_EXPORT int icaltime_compare_date_only(const struct icaltimetype a,
  195. const struct icaltimetype b);
  196. /** like icaltime_compare, but only use the date parts. */
  197. LIBICAL_ICAL_EXPORT int icaltime_compare_date_only_tz(const struct icaltimetype a,
  198. const struct icaltimetype b,
  199. icaltimezone *tz);
  200. /** Adds or subtracts a number of days, hours, minutes and seconds. */
  201. LIBICAL_ICAL_EXPORT void icaltime_adjust(struct icaltimetype *tt,
  202. const int days, const int hours,
  203. const int minutes, const int seconds);
  204. /** Normalize the icaltime, so that all fields are within the normal range. */
  205. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_normalize(const struct icaltimetype t);
  206. /** convert tt, of timezone tzid, into a utc time. Does nothing if the
  207. time is already UTC. */
  208. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_convert_to_zone(const struct icaltimetype tt,
  209. icaltimezone *zone);
  210. /** Return the number of days in the given month */
  211. LIBICAL_ICAL_EXPORT int icaltime_days_in_month(const int month, const int year);
  212. /** Return whether you've specified a leapyear or not. */
  213. LIBICAL_ICAL_EXPORT int icaltime_is_leap_year(const int year);
  214. /** Return the number of days in this year */
  215. LIBICAL_ICAL_EXPORT int icaltime_days_in_year(const int year);
  216. /** @brief calculate an icaltimespan given a start and end time. */
  217. LIBICAL_ICAL_EXPORT struct icaltime_span icaltime_span_new(struct icaltimetype dtstart,
  218. struct icaltimetype dtend, int is_busy);
  219. /** @brief Returns true if the two spans overlap **/
  220. LIBICAL_ICAL_EXPORT int icaltime_span_overlaps(icaltime_span *s1, icaltime_span *s2);
  221. /** @brief Returns true if the span is totally within the containing
  222. * span
  223. */
  224. LIBICAL_ICAL_EXPORT int icaltime_span_contains(icaltime_span *s, icaltime_span *container);
  225. #endif /* !ICALTIME_H */
  226. /*======================================================================
  227. FILE: icalduration.h
  228. CREATOR: eric 26 Jan 2001
  229. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  230. http://www.softwarestudio.org
  231. This program is free software; you can redistribute it and/or modify
  232. it under the terms of either:
  233. The LGPL as published by the Free Software Foundation, version
  234. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  235. Or:
  236. The Mozilla Public License Version 1.0. You may obtain a copy of
  237. the License at http://www.mozilla.org/MPL/
  238. The Original Code is eric. The Initial Developer of the Original
  239. Code is Eric Busboom
  240. ======================================================================*/
  241. #ifndef ICALDURATION_H
  242. #define ICALDURATION_H
  243. #include "libical_ical_export.h"
  244. struct icaldurationtype
  245. {
  246. int is_neg;
  247. unsigned int days;
  248. unsigned int weeks;
  249. unsigned int hours;
  250. unsigned int minutes;
  251. unsigned int seconds;
  252. };
  253. LIBICAL_ICAL_EXPORT struct icaldurationtype icaldurationtype_from_int(int t);
  254. LIBICAL_ICAL_EXPORT struct icaldurationtype icaldurationtype_from_string(const char *);
  255. LIBICAL_ICAL_EXPORT int icaldurationtype_as_int(struct icaldurationtype duration);
  256. LIBICAL_ICAL_EXPORT char *icaldurationtype_as_ical_string(struct icaldurationtype d);
  257. LIBICAL_ICAL_EXPORT char *icaldurationtype_as_ical_string_r(struct icaldurationtype d);
  258. LIBICAL_ICAL_EXPORT struct icaldurationtype icaldurationtype_null_duration(void);
  259. LIBICAL_ICAL_EXPORT struct icaldurationtype icaldurationtype_bad_duration(void);
  260. LIBICAL_ICAL_EXPORT int icaldurationtype_is_null_duration(struct icaldurationtype d);
  261. LIBICAL_ICAL_EXPORT int icaldurationtype_is_bad_duration(struct icaldurationtype d);
  262. LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_add(struct icaltimetype t,
  263. struct icaldurationtype d);
  264. LIBICAL_ICAL_EXPORT struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
  265. struct icaltimetype t2);
  266. #endif /* !ICALDURATION_H */
  267. /*======================================================================
  268. FILE: icalperiod.h
  269. CREATOR: eric 26 Jan 2001
  270. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  271. http://www.softwarestudio.org
  272. This program is free software; you can redistribute it and/or modify
  273. it under the terms of either:
  274. The LGPL as published by the Free Software Foundation, version
  275. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  276. Or:
  277. The Mozilla Public License Version 1.0. You may obtain a copy of
  278. the License at http://www.mozilla.org/MPL/
  279. The Original Code is eric. The Initial Developer of the Original
  280. Code is Eric Busboom
  281. ======================================================================*/
  282. #ifndef ICALPERIOD_H
  283. #define ICALPERIOD_H
  284. #include "libical_ical_export.h"
  285. struct icalperiodtype
  286. {
  287. struct icaltimetype start;
  288. struct icaltimetype end;
  289. struct icaldurationtype duration;
  290. };
  291. LIBICAL_ICAL_EXPORT struct icalperiodtype icalperiodtype_from_string(const char *str);
  292. LIBICAL_ICAL_EXPORT const char *icalperiodtype_as_ical_string(struct icalperiodtype p);
  293. LIBICAL_ICAL_EXPORT char *icalperiodtype_as_ical_string_r(struct icalperiodtype p);
  294. LIBICAL_ICAL_EXPORT struct icalperiodtype icalperiodtype_null_period(void);
  295. LIBICAL_ICAL_EXPORT int icalperiodtype_is_null_period(struct icalperiodtype p);
  296. LIBICAL_ICAL_EXPORT int icalperiodtype_is_valid_period(struct icalperiodtype p);
  297. #endif /* !ICALTIME_H */
  298. /*======================================================================
  299. FILE: icalenums.h
  300. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  301. http://www.softwarestudio.org
  302. This program is free software; you can redistribute it and/or modify
  303. it under the terms of either:
  304. The LGPL as published by the Free Software Foundation, version
  305. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  306. Or:
  307. The Mozilla Public License Version 1.0. You may obtain a copy of
  308. the License at http://www.mozilla.org/MPL/
  309. Contributions from:
  310. Graham Davison <g.m.davison@computer.org>
  311. ======================================================================*/
  312. #ifndef ICALENUMS_H
  313. #define ICALENUMS_H
  314. #include "libical_ical_export.h"
  315. /***********************************************************************
  316. * Component enumerations
  317. **********************************************************************/
  318. typedef enum icalcomponent_kind
  319. {
  320. ICAL_NO_COMPONENT,
  321. ICAL_ANY_COMPONENT, /* Used to select all components */
  322. ICAL_XROOT_COMPONENT,
  323. ICAL_XATTACH_COMPONENT, /* MIME attached data, returned by parser. */
  324. ICAL_VEVENT_COMPONENT,
  325. ICAL_VTODO_COMPONENT,
  326. ICAL_VJOURNAL_COMPONENT,
  327. ICAL_VCALENDAR_COMPONENT,
  328. ICAL_VAGENDA_COMPONENT,
  329. ICAL_VFREEBUSY_COMPONENT,
  330. ICAL_VALARM_COMPONENT,
  331. ICAL_XAUDIOALARM_COMPONENT,
  332. ICAL_XDISPLAYALARM_COMPONENT,
  333. ICAL_XEMAILALARM_COMPONENT,
  334. ICAL_XPROCEDUREALARM_COMPONENT,
  335. ICAL_VTIMEZONE_COMPONENT,
  336. ICAL_XSTANDARD_COMPONENT,
  337. ICAL_XDAYLIGHT_COMPONENT,
  338. ICAL_X_COMPONENT,
  339. ICAL_VSCHEDULE_COMPONENT,
  340. ICAL_VQUERY_COMPONENT,
  341. ICAL_VREPLY_COMPONENT,
  342. ICAL_VCAR_COMPONENT,
  343. ICAL_VCOMMAND_COMPONENT,
  344. ICAL_XLICINVALID_COMPONENT,
  345. ICAL_XLICMIMEPART_COMPONENT, /* a non-stardard component that mirrors
  346. structure of MIME data */
  347. ICAL_VAVAILABILITY_COMPONENT,
  348. ICAL_XAVAILABLE_COMPONENT,
  349. ICAL_VPOLL_COMPONENT,
  350. ICAL_VVOTER_COMPONENT,
  351. ICAL_XVOTE_COMPONENT
  352. } icalcomponent_kind;
  353. /***********************************************************************
  354. * Request Status codes
  355. **********************************************************************/
  356. typedef enum icalrequeststatus
  357. {
  358. ICAL_UNKNOWN_STATUS,
  359. ICAL_2_0_SUCCESS_STATUS,
  360. ICAL_2_1_FALLBACK_STATUS,
  361. ICAL_2_2_IGPROP_STATUS,
  362. ICAL_2_3_IGPARAM_STATUS,
  363. ICAL_2_4_IGXPROP_STATUS,
  364. ICAL_2_5_IGXPARAM_STATUS,
  365. ICAL_2_6_IGCOMP_STATUS,
  366. ICAL_2_7_FORWARD_STATUS,
  367. ICAL_2_8_ONEEVENT_STATUS,
  368. ICAL_2_9_TRUNC_STATUS,
  369. ICAL_2_10_ONETODO_STATUS,
  370. ICAL_2_11_TRUNCRRULE_STATUS,
  371. ICAL_3_0_INVPROPNAME_STATUS,
  372. ICAL_3_1_INVPROPVAL_STATUS,
  373. ICAL_3_2_INVPARAM_STATUS,
  374. ICAL_3_3_INVPARAMVAL_STATUS,
  375. ICAL_3_4_INVCOMP_STATUS,
  376. ICAL_3_5_INVTIME_STATUS,
  377. ICAL_3_6_INVRULE_STATUS,
  378. ICAL_3_7_INVCU_STATUS,
  379. ICAL_3_8_NOAUTH_STATUS,
  380. ICAL_3_9_BADVERSION_STATUS,
  381. ICAL_3_10_TOOBIG_STATUS,
  382. ICAL_3_11_MISSREQCOMP_STATUS,
  383. ICAL_3_12_UNKCOMP_STATUS,
  384. ICAL_3_13_BADCOMP_STATUS,
  385. ICAL_3_14_NOCAP_STATUS,
  386. ICAL_3_15_INVCOMMAND,
  387. ICAL_4_0_BUSY_STATUS,
  388. ICAL_4_1_STORE_ACCESS_DENIED,
  389. ICAL_4_2_STORE_FAILED,
  390. ICAL_4_3_STORE_NOT_FOUND,
  391. ICAL_5_0_MAYBE_STATUS,
  392. ICAL_5_1_UNAVAIL_STATUS,
  393. ICAL_5_2_NOSERVICE_STATUS,
  394. ICAL_5_3_NOSCHED_STATUS,
  395. ICAL_6_1_CONTAINER_NOT_FOUND,
  396. ICAL_9_0_UNRECOGNIZED_COMMAND
  397. } icalrequeststatus;
  398. LIBICAL_ICAL_EXPORT const char *icalenum_reqstat_desc(icalrequeststatus stat);
  399. LIBICAL_ICAL_EXPORT short icalenum_reqstat_major(icalrequeststatus stat);
  400. LIBICAL_ICAL_EXPORT short icalenum_reqstat_minor(icalrequeststatus stat);
  401. LIBICAL_ICAL_EXPORT icalrequeststatus icalenum_num_to_reqstat(short major, short minor);
  402. LIBICAL_ICAL_EXPORT char *icalenum_reqstat_code(icalrequeststatus stat);
  403. LIBICAL_ICAL_EXPORT char *icalenum_reqstat_code_r(icalrequeststatus stat);
  404. /***********************************************************************
  405. * Conversion functions
  406. **********************************************************************/
  407. /* Thse routines used to be in icalenums.c, but were moved into the
  408. icalproperty, icalparameter, icalvalue, or icalcomponent modules. */
  409. /*const char* icalproperty_kind_to_string(icalproperty_kind kind);*/
  410. #define icalenum_property_kind_to_string(x) icalproperty_kind_to_string(x)
  411. /*icalproperty_kind icalproperty_string_to_kind(const char* string)*/
  412. #define icalenum_string_to_property_kind(x) icalproperty_string_to_kind(x)
  413. /*icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);*/
  414. #define icalenum_property_kind_to_value_kind(x) icalproperty_kind_to_value_kind(x)
  415. /*const char* icalenum_method_to_string(icalproperty_method);*/
  416. #define icalenum_method_to_string(x) icalproperty_method_to_string(x)
  417. /*icalproperty_method icalenum_string_to_method(const char* string);*/
  418. #define icalenum_string_to_method(x) icalproperty_string_to_method(x)
  419. /*const char* icalenum_status_to_string(icalproperty_status);*/
  420. #define icalenum_status_to_string(x) icalproperty_status_to_string(x)
  421. /*icalproperty_status icalenum_string_to_status(const char* string);*/
  422. #define icalenum_string_to_status(x) icalproperty_string_to_status(x)
  423. /*icalvalue_kind icalenum_string_to_value_kind(const char* str);*/
  424. #define icalenum_string_to_value_kind(x) icalvalue_string_to_kind(x)
  425. /*const char* icalenum_value_kind_to_string(icalvalue_kind kind);*/
  426. #define icalenum_value_kind_to_string(x) icalvalue_kind_to_string(x)
  427. /*const char* icalenum_component_kind_to_string(icalcomponent_kind kind);*/
  428. #define icalenum_component_kind_to_string(x) icalcomponent_kind_to_string(x)
  429. /*icalcomponent_kind icalenum_string_to_component_kind(const char* string);*/
  430. #define icalenum_string_to_component_kind(x) icalcomponent_string_to_kind(x)
  431. #endif /* !ICALENUMS_H */
  432. /*======================================================================
  433. FILE: icaltypes.h
  434. CREATOR: eric 20 March 1999
  435. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  436. http://www.softwarestudio.org
  437. This program is free software; you can redistribute it and/or modify
  438. it under the terms of either:
  439. The LGPL as published by the Free Software Foundation, version
  440. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  441. Or:
  442. The Mozilla Public License Version 1.0. You may obtain a copy of
  443. the License at http://www.mozilla.org/MPL/
  444. ======================================================================*/
  445. #ifndef ICALTYPES_H
  446. #define ICALTYPES_H
  447. #include "libical_ical_export.h"
  448. struct icaldatetimeperiodtype
  449. {
  450. struct icaltimetype time;
  451. struct icalperiodtype period;
  452. };
  453. struct icalgeotype
  454. {
  455. double lat;
  456. double lon;
  457. };
  458. struct icaltriggertype
  459. {
  460. struct icaltimetype time;
  461. struct icaldurationtype duration;
  462. };
  463. LIBICAL_ICAL_EXPORT struct icaltriggertype icaltriggertype_from_int(const int reltime);
  464. LIBICAL_ICAL_EXPORT struct icaltriggertype icaltriggertype_from_string(const char *str);
  465. LIBICAL_ICAL_EXPORT int icaltriggertype_is_null_trigger(struct icaltriggertype tr);
  466. LIBICAL_ICAL_EXPORT int icaltriggertype_is_bad_trigger(struct icaltriggertype tr);
  467. /* struct icalreqstattype. This struct contains two string pointers,
  468. but don't try to free either of them. The "desc" string is a pointer
  469. to a static table inside the library. Don't try to free it. The
  470. "debug" string is a pointer into the string that the called passed
  471. into to icalreqstattype_from_string. Don't try to free it either, and
  472. don't use it after the original string has been freed.
  473. BTW, you would get that original string from
  474. *icalproperty_get_requeststatus() or icalvalue_get_text(), when
  475. operating on the value of a request_status property. */
  476. struct icalreqstattype
  477. {
  478. icalrequeststatus code;
  479. const char *desc;
  480. const char *debug;
  481. };
  482. LIBICAL_ICAL_EXPORT struct icalreqstattype icalreqstattype_from_string(const char *str);
  483. LIBICAL_ICAL_EXPORT const char *icalreqstattype_as_string(struct icalreqstattype);
  484. LIBICAL_ICAL_EXPORT char *icalreqstattype_as_string_r(struct icalreqstattype);
  485. struct icaltimezonephase
  486. {
  487. const char *tzname;
  488. int is_stdandard; /* 1 = standard tme, 0 = daylight savings time */
  489. struct icaltimetype dtstart;
  490. int offsetto;
  491. int tzoffsetfrom;
  492. const char *comment;
  493. struct icaldatetimeperiodtype rdate;
  494. const char *rrule;
  495. };
  496. struct icaltimezonetype
  497. {
  498. const char *tzid;
  499. struct icaltimetype last_mod;
  500. const char *tzurl;
  501. /* Array of phases. The end of the array is a phase with tzname == 0 */
  502. struct icaltimezonephase *phases;
  503. };
  504. LIBICAL_ICAL_EXPORT void icaltimezonetype_free(struct icaltimezonetype tzt);
  505. /* ical_unknown_token_handling :
  506. * How should the ICAL library handle components, properties and parameters with
  507. * unknown names?
  508. * FIXME: Currently only affects parameters. Extend to components and properties.
  509. */
  510. typedef enum ical_unknown_token_handling
  511. {
  512. ICAL_ASSUME_IANA_TOKEN = 1,
  513. ICAL_DISCARD_TOKEN = 2,
  514. ICAL_TREAT_AS_ERROR = 3
  515. } ical_unknown_token_handling;
  516. LIBICAL_ICAL_EXPORT ical_unknown_token_handling ical_get_unknown_token_handling_setting(void);
  517. LIBICAL_ICAL_EXPORT void ical_set_unknown_token_handling_setting(
  518. ical_unknown_token_handling newSetting);
  519. #endif /* !ICALTYPES_H */
  520. /*======================================================================
  521. FILE: icalarray.h
  522. CREATOR: Damon Chaplin 07 March 2001
  523. (C) COPYRIGHT 2001, Ximian, Inc.
  524. This program is free software; you can redistribute it and/or modify
  525. it under the terms of either:
  526. The LGPL as published by the Free Software Foundation, version
  527. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  528. Or:
  529. The Mozilla Public License Version 1.0. You may obtain a copy of
  530. the License at http://www.mozilla.org/MPL/
  531. ======================================================================*/
  532. /** @file icalarray.h
  533. *
  534. * @brief An array of arbitrarily-sized elements which grows
  535. * dynamically as elements are added.
  536. */
  537. #ifndef ICALARRAY_H
  538. #define ICALARRAY_H
  539. #include "libical_ical_export.h"
  540. typedef struct _icalarray icalarray;
  541. struct _icalarray
  542. {
  543. size_t element_size;
  544. size_t increment_size;
  545. size_t num_elements;
  546. size_t space_allocated;
  547. void **chunks;
  548. };
  549. LIBICAL_ICAL_EXPORT icalarray *icalarray_new(size_t element_size, size_t increment_size);
  550. LIBICAL_ICAL_EXPORT icalarray *icalarray_copy(icalarray *array);
  551. LIBICAL_ICAL_EXPORT void icalarray_free(icalarray *array);
  552. LIBICAL_ICAL_EXPORT void icalarray_append(icalarray *array, const void *element);
  553. LIBICAL_ICAL_EXPORT void icalarray_remove_element_at(icalarray *array, size_t position);
  554. LIBICAL_ICAL_EXPORT void *icalarray_element_at(icalarray *array, size_t position);
  555. LIBICAL_ICAL_EXPORT void icalarray_sort(icalarray *array,
  556. int (*compare) (const void *, const void *));
  557. #endif /* ICALARRAY_H */
  558. /*======================================================================
  559. FILE: icalrecur.h
  560. CREATOR: eric 20 March 2000
  561. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  562. http://www.softwarestudio.org
  563. This program is free software; you can redistribute it and/or modify
  564. it under the terms of either:
  565. The LGPL as published by the Free Software Foundation, version
  566. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  567. Or:
  568. The Mozilla Public License Version 1.0. You may obtain a copy of
  569. the License at http://www.mozilla.org/MPL/
  570. ========================================================================*/
  571. /**
  572. @file icalrecur.h
  573. @brief Routines for dealing with recurring time
  574. How to use:
  575. 1) Get a rule and a start time from a component
  576. @code
  577. icalproperty rrule;
  578. struct icalrecurrencetype recur;
  579. struct icaltimetype dtstart;
  580. rrule = icalcomponent_get_first_property(comp,ICAL_RRULE_PROPERTY);
  581. recur = icalproperty_get_rrule(rrule);
  582. start = icalproperty_get_dtstart(dtstart);
  583. @endcode
  584. Or, just make them up:
  585. @code
  586. recur = icalrecurrencetype_from_string("FREQ=YEARLY;BYDAY=SU,WE");
  587. dtstart = icaltime_from_string("19970101T123000")
  588. @endcode
  589. 2) Create an iterator
  590. @code
  591. icalrecur_iterator* ritr;
  592. ritr = icalrecur_iterator_new(recur,start);
  593. @endcode
  594. 3) Iterator over the occurrences
  595. @code
  596. struct icaltimetype next;
  597. while (next = icalrecur_iterator_next(ritr)
  598. && !icaltime_is_null_time(next){
  599. Do something with next
  600. }
  601. @endcode
  602. Note that that the time returned by icalrecur_iterator_next is in
  603. whatever timezone that dtstart is in.
  604. */
  605. #ifndef ICALRECUR_H
  606. #define ICALRECUR_H
  607. #include "libical_ical_export.h"
  608. /*
  609. * Recurrence enumerations
  610. */
  611. typedef enum icalrecurrencetype_frequency
  612. {
  613. /* These enums are used to index an array, so don't change the
  614. order or the integers */
  615. ICAL_SECONDLY_RECURRENCE = 0,
  616. ICAL_MINUTELY_RECURRENCE = 1,
  617. ICAL_HOURLY_RECURRENCE = 2,
  618. ICAL_DAILY_RECURRENCE = 3,
  619. ICAL_WEEKLY_RECURRENCE = 4,
  620. ICAL_MONTHLY_RECURRENCE = 5,
  621. ICAL_YEARLY_RECURRENCE = 6,
  622. ICAL_NO_RECURRENCE = 7
  623. } icalrecurrencetype_frequency;
  624. typedef enum icalrecurrencetype_weekday
  625. {
  626. ICAL_NO_WEEKDAY,
  627. ICAL_SUNDAY_WEEKDAY,
  628. ICAL_MONDAY_WEEKDAY,
  629. ICAL_TUESDAY_WEEKDAY,
  630. ICAL_WEDNESDAY_WEEKDAY,
  631. ICAL_THURSDAY_WEEKDAY,
  632. ICAL_FRIDAY_WEEKDAY,
  633. ICAL_SATURDAY_WEEKDAY
  634. } icalrecurrencetype_weekday;
  635. typedef enum icalrecurrencetype_skip
  636. {
  637. ICAL_SKIP_BACKWARD = 0,
  638. ICAL_SKIP_FORWARD,
  639. ICAL_SKIP_OMIT,
  640. ICAL_SKIP_UNDEFINED
  641. } icalrecurrencetype_skip;
  642. enum icalrecurrence_array_max_values
  643. {
  644. ICAL_RECURRENCE_ARRAY_MAX = 0x7f7f,
  645. ICAL_RECURRENCE_ARRAY_MAX_BYTE = 0x7f
  646. };
  647. /*
  648. * Recurrence enumerations conversion routines.
  649. */
  650. LIBICAL_ICAL_EXPORT icalrecurrencetype_frequency icalrecur_string_to_freq(const char *str);
  651. LIBICAL_ICAL_EXPORT const char *icalrecur_freq_to_string(icalrecurrencetype_frequency kind);
  652. LIBICAL_ICAL_EXPORT icalrecurrencetype_skip icalrecur_string_to_skip(const char *str);
  653. LIBICAL_ICAL_EXPORT const char *icalrecur_skip_to_string(icalrecurrencetype_skip kind);
  654. LIBICAL_ICAL_EXPORT const char *icalrecur_weekday_to_string(icalrecurrencetype_weekday kind);
  655. LIBICAL_ICAL_EXPORT icalrecurrencetype_weekday icalrecur_string_to_weekday(const char *str);
  656. /**
  657. * Recurrence type routines
  658. */
  659. /* See RFC 5545 Section 3.3.10, RECUR Value, and RFC 7529
  660. * for an explanation of the values and fields in struct icalrecurrencetype.
  661. *
  662. * The maximums below are based on lunisolar leap years (13 months)
  663. */
  664. #define ICAL_BY_SECOND_SIZE 62 /* 0 to 60 */
  665. #define ICAL_BY_MINUTE_SIZE 61 /* 0 to 59 */
  666. #define ICAL_BY_HOUR_SIZE 25 /* 0 to 23 */
  667. #define ICAL_BY_MONTH_SIZE 14 /* 1 to 13 */
  668. #define ICAL_BY_MONTHDAY_SIZE 32 /* 1 to 31 */
  669. #define ICAL_BY_WEEKNO_SIZE 56 /* 1 to 55 */
  670. #define ICAL_BY_YEARDAY_SIZE 386 /* 1 to 385 */
  671. #define ICAL_BY_SETPOS_SIZE ICAL_BY_YEARDAY_SIZE /* 1 to N */
  672. #define ICAL_BY_DAY_SIZE 7*(ICAL_BY_WEEKNO_SIZE-1)+1 /* 1 to N */
  673. /** Main struct for holding digested recurrence rules */
  674. struct icalrecurrencetype
  675. {
  676. icalrecurrencetype_frequency freq;
  677. /* until and count are mutually exclusive. */
  678. struct icaltimetype until;
  679. int count;
  680. short interval;
  681. icalrecurrencetype_weekday week_start;
  682. /* The BY* parameters can each take a list of values. Here I
  683. * assume that the list of values will not be larger than the
  684. * range of the value -- that is, the client will not name a
  685. * value more than once.
  686. * Each of the lists is terminated with the value
  687. * ICAL_RECURRENCE_ARRAY_MAX unless the list is full.
  688. */
  689. short by_second[ICAL_BY_SECOND_SIZE];
  690. short by_minute[ICAL_BY_MINUTE_SIZE];
  691. short by_hour[ICAL_BY_HOUR_SIZE];
  692. short by_day[ICAL_BY_DAY_SIZE]; /* Encoded value, see below */
  693. short by_month_day[ICAL_BY_MONTHDAY_SIZE];
  694. short by_year_day[ICAL_BY_YEARDAY_SIZE];
  695. short by_week_no[ICAL_BY_WEEKNO_SIZE];
  696. short by_month[ICAL_BY_MONTH_SIZE];
  697. short by_set_pos[ICAL_BY_SETPOS_SIZE];
  698. /* For RSCALE extension (RFC 7529) */
  699. char *rscale;
  700. icalrecurrencetype_skip skip;
  701. };
  702. LIBICAL_ICAL_EXPORT int icalrecurrencetype_rscale_is_supported(void);
  703. LIBICAL_ICAL_EXPORT icalarray *icalrecurrencetype_rscale_supported_calendars(void);
  704. LIBICAL_ICAL_EXPORT void icalrecurrencetype_clear(struct icalrecurrencetype *r);
  705. /**
  706. * Array Encoding
  707. *
  708. * The 'day' element of the by_day array is encoded to allow
  709. * representation of both the day of the week ( Monday, Tueday), but also
  710. * the Nth day of the week ( First tuesday of the month, last thursday of
  711. * the year) These routines decode the day values
  712. */
  713. /** 1 == Monday, etc. */
  714. LIBICAL_ICAL_EXPORT enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day);
  715. /** 0 == any of day of week. 1 == first, 2 = second, -2 == second to last, etc */
  716. LIBICAL_ICAL_EXPORT int icalrecurrencetype_day_position(short day);
  717. /**
  718. * The 'month' element of the by_month array is encoded to allow
  719. * representation of the "L" leap suffix (RFC 7529).
  720. * These routines decode the month values.
  721. */
  722. LIBICAL_ICAL_EXPORT int icalrecurrencetype_month_is_leap(short month);
  723. LIBICAL_ICAL_EXPORT int icalrecurrencetype_month_month(short month);
  724. /** Recurrance rule parser */
  725. /** Convert between strings and recurrencetype structures. */
  726. LIBICAL_ICAL_EXPORT struct icalrecurrencetype icalrecurrencetype_from_string(const char *str);
  727. LIBICAL_ICAL_EXPORT char *icalrecurrencetype_as_string(struct icalrecurrencetype *recur);
  728. LIBICAL_ICAL_EXPORT char *icalrecurrencetype_as_string_r(struct icalrecurrencetype *recur);
  729. /** Recurrence iteration routines */
  730. typedef struct icalrecur_iterator_impl icalrecur_iterator;
  731. /** Create a new recurrence rule iterator */
  732. LIBICAL_ICAL_EXPORT icalrecur_iterator *icalrecur_iterator_new(struct icalrecurrencetype rule,
  733. struct icaltimetype dtstart);
  734. /** Get the next occurrence from an iterator */
  735. LIBICAL_ICAL_EXPORT struct icaltimetype icalrecur_iterator_next(icalrecur_iterator *);
  736. /** Free the iterator */
  737. LIBICAL_ICAL_EXPORT void icalrecur_iterator_free(icalrecur_iterator *);
  738. /**
  739. * Fills array up with at most 'count' time_t values, each
  740. * representing an occurrence time in seconds past the POSIX epoch
  741. */
  742. LIBICAL_ICAL_EXPORT int icalrecur_expand_recurrence(char *rule, time_t start,
  743. int count, time_t * array);
  744. #endif
  745. /*======================================================================
  746. FILE: icalattach.h
  747. CREATOR: acampi 28 May 02
  748. (C) COPYRIGHT 2002, Andrea Campi <a.campi@inet.it>
  749. This program is free software; you can redistribute it and/or modify
  750. it under the terms of either:
  751. The LGPL as published by the Free Software Foundation, version
  752. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  753. Or:
  754. The Mozilla Public License Version 1.0. You may obtain a copy of
  755. the License at http://www.mozilla.org/MPL/
  756. ======================================================================*/
  757. #ifndef ICALATTACH_H
  758. #define ICALATTACH_H
  759. #include "libical_ical_export.h"
  760. typedef struct icalattach_impl icalattach;
  761. typedef void (*icalattach_free_fn_t) (unsigned char *data, void *user_data);
  762. LIBICAL_ICAL_EXPORT icalattach *icalattach_new_from_url(const char *url);
  763. LIBICAL_ICAL_EXPORT icalattach *icalattach_new_from_data(const char *data,
  764. icalattach_free_fn_t free_fn,
  765. void *free_fn_data);
  766. LIBICAL_ICAL_EXPORT void icalattach_ref(icalattach *attach);
  767. LIBICAL_ICAL_EXPORT void icalattach_unref(icalattach *attach);
  768. LIBICAL_ICAL_EXPORT int icalattach_get_is_url(icalattach *attach);
  769. LIBICAL_ICAL_EXPORT const char *icalattach_get_url(icalattach *attach);
  770. LIBICAL_ICAL_EXPORT unsigned char *icalattach_get_data(icalattach *attach);
  771. LIBICAL_ICAL_EXPORT struct icalattachtype *icalattachtype_new(void);
  772. LIBICAL_ICAL_EXPORT void icalattachtype_add_reference(struct icalattachtype *v);
  773. LIBICAL_ICAL_EXPORT void icalattachtype_free(struct icalattachtype *v);
  774. LIBICAL_ICAL_EXPORT void icalattachtype_set_url(struct icalattachtype *v, char *url);
  775. LIBICAL_ICAL_EXPORT char *icalattachtype_get_url(struct icalattachtype *v);
  776. LIBICAL_ICAL_EXPORT void icalattachtype_set_base64(struct icalattachtype *v,
  777. char *base64, int owns);
  778. LIBICAL_ICAL_EXPORT char *icalattachtype_get_base64(struct icalattachtype *v);
  779. LIBICAL_ICAL_EXPORT void icalattachtype_set_binary(struct icalattachtype *v,
  780. char *binary, int owns);
  781. LIBICAL_ICAL_EXPORT void *icalattachtype_get_binary(struct icalattachtype *v);
  782. #endif /* !ICALATTACH_H */
  783. /*======================================================================
  784. FILE: icalvalue.h
  785. CREATOR: eric 20 March 1999
  786. (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
  787. This program is free software; you can redistribute it and/or modify
  788. it under the terms of either:
  789. The LGPL as published by the Free Software Foundation, version
  790. 2.1, available at: http://www.fsf.org/copyleft/lesser.html
  791. Or:
  792. The Mozilla Public License Version 1.0. You may obtain a copy of
  793. the License at http://www.mozilla.org/MPL/
  794. ======================================================================*/
  795. #ifndef ICALDERIVEDVALUE_H
  796. #define ICALDERIVEDVALUE_H
  797. #include "libical_ical_export.h"
  798. typedef struct icalvalue_impl icalvalue;
  799. LIBICAL_ICAL_EXPORT void icalvalue_set_x(icalvalue* value, const char* v);
  800. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_x(const char* v);
  801. LIBICAL_ICAL_EXPORT const char* icalvalue_get_x(const icalvalue* value);
  802. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_recur (struct icalrecurrencetype v);
  803. LIBICAL_ICAL_EXPORT void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
  804. LIBICAL_ICAL_EXPORT struct icalrecurrencetype icalvalue_get_recur(const icalvalue* value);
  805. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_trigger (struct icaltriggertype v);
  806. LIBICAL_ICAL_EXPORT void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v);
  807. LIBICAL_ICAL_EXPORT struct icaltriggertype icalvalue_get_trigger(const icalvalue* value);
  808. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_datetime(struct icaltimetype v);
  809. LIBICAL_ICAL_EXPORT struct icaltimetype icalvalue_get_datetime(const icalvalue* value);
  810. LIBICAL_ICAL_EXPORT void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v);
  811. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v);
  812. LIBICAL_ICAL_EXPORT void icalvalue_set_datetimeperiod(icalvalue* value,
  813. struct icaldatetimeperiodtype v);
  814. LIBICAL_ICAL_EXPORT struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* value);
  815. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_geo(struct icalgeotype v);
  816. LIBICAL_ICAL_EXPORT struct icalgeotype icalvalue_get_geo(const icalvalue* value);
  817. LIBICAL_ICAL_EXPORT void icalvalue_set_geo(icalvalue* value, struct icalgeotype v);
  818. LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new_attach (icalattach *attach);
  819. LIBICAL_ICAL_EXPORT void icalvalue_set_attach (icalvalue *value, icalattach *attach);
  820. LIBICAL_ICAL_EXPORT icalattach *icalvalue_get_attach (const icalvalue *value);
  821. LIBICAL_ICAL_EXPORT void icalvalue_reset_kind(icalvalue* value);
  822. typedef enum icalvalue_kind {
  823. ICAL_ANY_VALUE=5000,
  824. ICAL_ACTION_VALUE=5027,
  825. ICAL_ATTACH_VALUE=5003,
  826. ICAL_BINARY_VALUE=5011,
  827. ICAL_BOOLEAN_VALUE=5021,
  828. ICAL_BUSYTYPE_VALUE=5032,
  829. ICAL_CALADDRESS_VALUE=5023,
  830. ICAL_CARLEVEL_VALUE=5016,
  831. ICAL_CLASS_VALUE=5019,
  832. ICAL_CMD_VALUE=5010,
  833. ICAL_DATE_VALUE=5002,
  834. ICAL_DATETIME_VALUE=5028,
  835. ICAL_DATETIMEPERIOD_VALUE=5015,
  836. ICAL_DURATION_VALUE=5020,
  837. ICAL_FLOAT_VALUE=5013,
  838. ICAL_GEO_VALUE=5004,
  839. ICAL_INTEGER_VALUE=5017,
  840. ICAL_METHOD_VALUE=5030,
  841. ICAL_PERIOD_VALUE=5014,
  842. ICAL_POLLCOMPLETION_VALUE=5034,
  843. ICAL_POLLMODE_VALUE=5033,
  844. ICAL_QUERY_VALUE=5001,
  845. ICAL_QUERYLEVEL_VALUE=5012,
  846. ICAL_RECUR_VALUE=5026,
  847. ICAL_REQUESTSTATUS_VALUE=5009,
  848. ICAL_STATUS_VALUE=5005,
  849. ICAL_STRING_VALUE=5007,
  850. ICAL_TASKMODE_VALUE=5035,
  851. ICAL_TEXT_VALUE=5008,
  852. ICAL_TRANSP_VALUE=5006,
  853. ICAL_TRIGGER_VALUE=5024,
  854. ICAL_URI_VALUE=5018,
  855. ICAL_UTCOFFSET_VALUE=5029,
  856. ICAL_X_VALUE=5022,
  857. ICAL_XLICCLASS_VALUE=5025,
  858. ICAL_NO_VALUE=5031
  859. } icalvalue_kind ;
  860. #define ICALPROPERTY_FIRST_ENUM 10000
  861. typedef enum icalproperty_action {
  862. ICAL_ACTION_X = 10000,
  863. ICAL_ACTION_AUDIO = 10001,
  864. ICAL_ACTION_DISPLAY = 10002,
  865. ICAL_ACTION_EMAIL = 10003,
  866. ICAL_ACTION_PROCEDURE = 10004,
  867. ICAL_ACTION_NONE = 10099
  868. } icalproperty_action;
  869. typedef enum icalproperty_busytype {
  870. ICAL_BUSYTYPE_X = 10100,
  871. ICAL_BUSYTYPE_BUSY = 10101,
  872. ICAL_BUSYTYPE_BUSYUNAVAILABLE = 10102,
  873. ICAL_BUSYTYPE_BUSYTENTATIVE = 10103,
  874. ICAL_BUSYTYPE_NONE = 10199
  875. } icalproperty_busytype;
  876. typedef enum icalproperty_carlevel {
  877. ICAL_CARLEVEL_X = 10200,
  878. ICAL_CARLEVEL_CARNONE = 10201,
  879. ICAL_CARLEVEL_CARMIN = 10202,
  880. ICAL_CARLEVEL_CARFULL1 = 10203,
  881. ICAL_CARLEVEL_NONE = 10299
  882. } icalproperty_carlevel;
  883. typedef enum icalproperty_class {
  884. ICAL_CLASS_X = 10300,
  885. ICAL_CLASS_PUBLIC = 10301,
  886. ICAL_CLASS_PRIVATE = 10302,
  887. ICAL_CLASS_CONFIDENTIAL = 10303,
  888. ICAL_CLASS_NONE = 10399
  889. } icalproperty_class;
  890. typedef enum icalproperty_cmd {
  891. ICAL_CMD_X = 10400,
  892. ICAL_CMD_ABORT = 10401,
  893. ICAL_CMD_CONTINUE = 10402,
  894. ICAL_CMD_CREATE = 10403,
  895. ICAL_CMD_DELETE = 10404,
  896. ICAL_CMD_GENERATEUID = 10405,
  897. ICAL_CMD_GETCAPABILITY = 10406,
  898. ICAL_CMD_IDENTIFY = 10407,
  899. ICAL_CMD_MODIFY = 10408,
  900. ICAL_CMD_MOVE = 10409,
  901. ICAL_CMD_REPLY = 10410,
  902. ICAL_CMD_SEARCH = 10411,
  903. ICAL_CMD_SETLOCALE = 10412,
  904. ICAL_CMD_NONE = 10499
  905. } icalproperty_cmd;
  906. typedef enum icalproperty_method {
  907. ICAL_METHOD_X = 10500,
  908. ICAL_METHOD_PUBLISH = 10501,
  909. ICAL_METHOD_REQUEST = 10502,
  910. ICAL_METHOD_REPLY = 10503,
  911. ICAL_METHOD_ADD = 10504,
  912. ICAL_METHOD_CANCEL = 10505,
  913. ICAL_METHOD_REFRESH = 10506,
  914. ICAL_METHOD_COUNTER = 10507,
  915. ICAL_METHOD_DECLINECOUNTER = 10508,
  916. ICAL_METHOD_CREATE = 10509,
  917. ICAL_METHOD_READ = 10510,
  918. ICAL_METHOD_RESPONSE = 10511,
  919. ICAL_METHOD_MOVE = 10512,
  920. ICAL_METHOD_MODIFY = 10513,
  921. ICAL_METHOD_GENERATEUID = 10514,
  922. ICAL_METHOD_DELETE = 10515,
  923. ICAL_METHOD_POLLSTATUS = 10516,
  924. ICAL_METHOD_NONE = 10599
  925. } icalproperty_method;
  926. typedef enum icalproperty_pollcompletion {
  927. ICAL_POLLCOMPLETION_X = 10600,
  928. ICAL_POLLCOMPLETION_SERVER = 10601,
  929. ICAL_POLLCOMPLETION_SERVERSUBMIT = 10602,
  930. ICAL_POLLCOMPLETION_SERVERCHOICE = 10603,
  931. ICAL_POLLCOMPLETION_CLIENT = 10604,
  932. ICAL_POLLCOMPLETION_NONE = 10699
  933. } icalproperty_pollcompletion;
  934. typedef enum icalproperty_pollmode {
  935. ICAL_POLLMODE_X = 10700,
  936. ICAL_POLLMODE_BASIC = 10701,
  937. ICAL_POLLMODE_NONE = 10799
  938. } icalproperty_pollmode;
  939. typedef enum icalproperty_querylevel {
  940. ICAL_QUERYLEVEL_X = 10800,
  941. ICAL_QUERYLEVEL_CALQL1 = 10801,
  942. ICAL_QUERYLEVEL_CALQLNONE = 10802,
  943. ICAL_QUERYLEVEL_NONE = 10899
  944. } icalproperty_querylevel;
  945. typedef enum icalproperty_status {
  946. ICAL_STATUS_X = 10900,
  947. ICAL_STATUS_TENTATIVE = 10901,
  948. ICAL_STATUS_CONFIRMED = 10902,
  949. ICAL_STATUS_COMPLETED = 10903,
  950. ICAL_STATUS_NEEDSACTION = 10904,
  951. ICAL_STATUS_CANCELLED = 10905,
  952. ICAL_STATUS_INPROCESS = 10906,
  953. ICAL_STATUS_DRAFT = 10907,
  954. ICAL_STATUS_FINAL = 10908,
  955. ICAL_STATUS_SUBMITTED = 10909,
  956. ICAL_STATUS_PENDING = 10910,
  957. ICAL_STATUS_FAILED = 10911,
  958. ICAL_STATUS_NONE = 10999
  959. } icalproperty_status;
  960. typedef enum icalproperty_taskmode {
  961. ICAL_TASKMODE_X = 11200,
  962. ICAL_TASKMODE_AUTOMATICCOMPLETION = 11201,
  963. ICAL_TASKMODE_AUTOMATICFAILURE = 11202,
  964. ICAL_TASKMODE_AUTOMATICSTATUS = 11203,
  965. ICAL_TASKMODE_NONE = 11299
  966. } icalproperty_taskmode;
  967. typedef enum icalproperty_transp {
  968. ICAL_TRANSP_X = 11000,
  969. ICAL_TRANSP_OPAQUE = 11001,
  970. ICAL_TRANSP_OPAQUENOCONFLICT = 11002,
  971. ICAL_TRANSP_TRANSPARENT = 11003,
  972. ICAL_TRANSP_TRANSPARENTNOCONFLICT = 11004,
  973. ICAL_TRANSP_NONE = 11099
  974. } icalproperty_transp;
  975. typedef enum icalproperty_xlicclass {
  976. ICAL_XLICCLASS_X = 11100,
  977. ICAL_XLICCLASS_PUBLISHNEW = 11101,
  978. ICAL_XLICCLASS_PUBLISHUPDATE = 11102,
  979. ICAL_XLICCLASS_PUBLISHFREEBUSY = 11103,
  980. ICAL_XLICCLASS_REQUESTNEW = 11104,
  981. ICAL_XLICCLASS_REQUESTUPDATE = 11105,
  982. ICAL_XLICCLASS_REQUESTRESCHEDULE = 11106,
  983. ICAL_XLICCLASS_REQUESTDELEGATE = 11107,
  984. ICAL_XLICCLASS_REQUESTNEWORGANIZER = 11108,
  985. ICAL_XLICCLASS_REQUESTFORWARD = 11109,
  986. ICAL_XLICCLASS_REQUESTSTATUS = 11110,
  987. ICAL_XLICCLASS_REQUESTFREEBUSY = 11111,
  988. ICAL_XLICCLASS_REPLYACCEPT = 11112,
  989. ICAL_XLICCLASS_REPLYDECLINE = 11113,
  990. ICAL_XLICCLASS_REPLYDELEGATE = 11114,
  991. ICAL_XLICCLASS_REPLYCRASHERACCEPT = 11115,
  992. ICAL_XLICCLASS_REPLYCRASHERDECLINE = 11116,
  993. ICAL_XLICCLASS_ADDINSTANCE = 11117,
  994. ICAL_XLICCLASS_CANCELEVENT = 11118,
  995. ICAL_XLICCLASS_CANCELINSTANCE = 11119,
  996. ICAL_XLICCLASS_CANCELALL = 11120,
  997. ICAL_XLICCLASS_REFRESH = 11121,
  998. ICAL_XLICCLASS_COUNTER = 11122,
  999. ICAL_XLICCLASS_DECLINECOUNTER = 11123,
  1000. ICAL_XLICCLASS_MALFORMED = 11124,
  1001. ICAL_XLICCLASS_OBSOLETE = 11125,
  1002. ICAL_XLICCLASS_MISSEQUENCED = 11126,
  1003. ICAL_XLICCLASS_UNKNOWN = 11127,
  1004. ICAL_XLICCLASS_NONE = 11199
  1005. } icalproperty_xlicclass;
  1006. #define ICALPROPERTY_LAST_ENUM 11300
  1007. /* ACTION */
  1008. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_action(enum icalproperty_action v);
  1009. LIBICAL_ICAL_EXPORT enum icalproperty_action icalvalue_get_action(const icalvalue* value);
  1010. LIBICAL_ICAL_EXPORT void icalvalue_set_action(icalvalue* value, enum icalproperty_action v);
  1011. /* BINARY */
  1012. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_binary(const char* v);
  1013. LIBICAL_ICAL_EXPORT const char* icalvalue_get_binary(const icalvalue* value);
  1014. LIBICAL_ICAL_EXPORT void icalvalue_set_binary(icalvalue* value, const char* v);
  1015. /* BOOLEAN */
  1016. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_boolean(int v);
  1017. LIBICAL_ICAL_EXPORT int icalvalue_get_boolean(const icalvalue* value);
  1018. LIBICAL_ICAL_EXPORT void icalvalue_set_boolean(icalvalue* value, int v);
  1019. /* BUSYTYPE */
  1020. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_busytype(enum icalproperty_busytype v);
  1021. LIBICAL_ICAL_EXPORT enum icalproperty_busytype icalvalue_get_busytype(const icalvalue* value);
  1022. LIBICAL_ICAL_EXPORT void icalvalue_set_busytype(icalvalue* value, enum icalproperty_busytype v);
  1023. /* CAL-ADDRESS */
  1024. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_caladdress(const char* v);
  1025. LIBICAL_ICAL_EXPORT const char* icalvalue_get_caladdress(const icalvalue* value);
  1026. LIBICAL_ICAL_EXPORT void icalvalue_set_caladdress(icalvalue* value, const char* v);
  1027. /* CAR-LEVEL */
  1028. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_carlevel(enum icalproperty_carlevel v);
  1029. LIBICAL_ICAL_EXPORT enum icalproperty_carlevel icalvalue_get_carlevel(const icalvalue* value);
  1030. LIBICAL_ICAL_EXPORT void icalvalue_set_carlevel(icalvalue* value, enum icalproperty_carlevel v);
  1031. /* CMD */
  1032. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_cmd(enum icalproperty_cmd v);
  1033. LIBICAL_ICAL_EXPORT enum icalproperty_cmd icalvalue_get_cmd(const icalvalue* value);
  1034. LIBICAL_ICAL_EXPORT void icalvalue_set_cmd(icalvalue* value, enum icalproperty_cmd v);
  1035. /* DATE */
  1036. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_date(struct icaltimetype v);
  1037. LIBICAL_ICAL_EXPORT struct icaltimetype icalvalue_get_date(const icalvalue* value);
  1038. LIBICAL_ICAL_EXPORT void icalvalue_set_date(icalvalue* value, struct icaltimetype v);
  1039. /* DURATION */
  1040. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_duration(struct icaldurationtype v);
  1041. LIBICAL_ICAL_EXPORT struct icaldurationtype icalvalue_get_duration(const icalvalue* value);
  1042. LIBICAL_ICAL_EXPORT void icalvalue_set_duration(icalvalue* value, struct icaldurationtype v);
  1043. /* FLOAT */
  1044. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_float(float v);
  1045. LIBICAL_ICAL_EXPORT float icalvalue_get_float(const icalvalue* value);
  1046. LIBICAL_ICAL_EXPORT void icalvalue_set_float(icalvalue* value, float v);
  1047. /* INTEGER */
  1048. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_integer(int v);
  1049. LIBICAL_ICAL_EXPORT int icalvalue_get_integer(const icalvalue* value);
  1050. LIBICAL_ICAL_EXPORT void icalvalue_set_integer(icalvalue* value, int v);
  1051. /* METHOD */
  1052. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_method(enum icalproperty_method v);
  1053. LIBICAL_ICAL_EXPORT enum icalproperty_method icalvalue_get_method(const icalvalue* value);
  1054. LIBICAL_ICAL_EXPORT void icalvalue_set_method(icalvalue* value, enum icalproperty_method v);
  1055. /* PERIOD */
  1056. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_period(struct icalperiodtype v);
  1057. LIBICAL_ICAL_EXPORT struct icalperiodtype icalvalue_get_period(const icalvalue* value);
  1058. LIBICAL_ICAL_EXPORT void icalvalue_set_period(icalvalue* value, struct icalperiodtype v);
  1059. /* POLLCOMPLETION */
  1060. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_pollcompletion(enum icalproperty_pollcompletion v);
  1061. LIBICAL_ICAL_EXPORT enum icalproperty_pollcompletion icalvalue_get_pollcompletion(const icalvalue* value);
  1062. LIBICAL_ICAL_EXPORT void icalvalue_set_pollcompletion(icalvalue* value, enum icalproperty_pollcompletion v);
  1063. /* POLLMODE */
  1064. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_pollmode(enum icalproperty_pollmode v);
  1065. LIBICAL_ICAL_EXPORT enum icalproperty_pollmode icalvalue_get_pollmode(const icalvalue* value);
  1066. LIBICAL_ICAL_EXPORT void icalvalue_set_pollmode(icalvalue* value, enum icalproperty_pollmode v);
  1067. /* QUERY */
  1068. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_query(const char* v);
  1069. LIBICAL_ICAL_EXPORT const char* icalvalue_get_query(const icalvalue* value);
  1070. LIBICAL_ICAL_EXPORT void icalvalue_set_query(icalvalue* value, const char* v);
  1071. /* QUERY-LEVEL */
  1072. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_querylevel(enum icalproperty_querylevel v);
  1073. LIBICAL_ICAL_EXPORT enum icalproperty_querylevel icalvalue_get_querylevel(const icalvalue* value);
  1074. LIBICAL_ICAL_EXPORT void icalvalue_set_querylevel(icalvalue* value, enum icalproperty_querylevel v);
  1075. /* REQUEST-STATUS */
  1076. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_requeststatus(struct icalreqstattype v);
  1077. LIBICAL_ICAL_EXPORT struct icalreqstattype icalvalue_get_requeststatus(const icalvalue* value);
  1078. LIBICAL_ICAL_EXPORT void icalvalue_set_requeststatus(icalvalue* value, struct icalreqstattype v);
  1079. /* STATUS */
  1080. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_status(enum icalproperty_status v);
  1081. LIBICAL_ICAL_EXPORT enum icalproperty_status icalvalue_get_status(const icalvalue* value);
  1082. LIBICAL_ICAL_EXPORT void icalvalue_set_status(icalvalue* value, enum icalproperty_status v);
  1083. /* STRING */
  1084. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_string(const char* v);
  1085. LIBICAL_ICAL_EXPORT const char* icalvalue_get_string(const icalvalue* value);
  1086. LIBICAL_ICAL_EXPORT void icalvalue_set_string(icalvalue* value, const char* v);
  1087. /* TASKMODE */
  1088. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_taskmode(enum icalproperty_taskmode v);
  1089. LIBICAL_ICAL_EXPORT enum icalproperty_taskmode icalvalue_get_taskmode(const icalvalue* value);
  1090. LIBICAL_ICAL_EXPORT void icalvalue_set_taskmode(icalvalue* value, enum icalproperty_taskmode v);
  1091. /* TEXT */
  1092. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_text(const char* v);
  1093. LIBICAL_ICAL_EXPORT const char* icalvalue_get_text(const icalvalue* value);
  1094. LIBICAL_ICAL_EXPORT void icalvalue_set_text(icalvalue* value, const char* v);
  1095. /* TRANSP */
  1096. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_transp(enum icalproperty_transp v);
  1097. LIBICAL_ICAL_EXPORT enum icalproperty_transp icalvalue_get_transp(const icalvalue* value);
  1098. LIBICAL_ICAL_EXPORT void icalvalue_set_transp(icalvalue* value, enum icalproperty_transp v);
  1099. /* URI */
  1100. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_uri(const char* v);
  1101. LIBICAL_ICAL_EXPORT const char* icalvalue_get_uri(const icalvalue* value);
  1102. LIBICAL_ICAL_EXPORT void icalvalue_set_uri(icalvalue* value, const char* v);
  1103. /* UTC-OFFSET */
  1104. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_utcoffset(int v);
  1105. LIBICAL_ICAL_EXPORT int icalvalue_get_utcoffset(const icalvalue* value);
  1106. LIBICAL_ICAL_EXPORT void icalvalue_set_utcoffset(icalvalue* value, int v);
  1107. /* X-LIC-CLASS */
  1108. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_xlicclass(enum icalproperty_xlicclass v);
  1109. LIBICAL_ICAL_EXPORT enum icalproperty_xlicclass icalvalue_get_xlicclass(const icalvalue* value);
  1110. LIBICAL_ICAL_EXPORT void icalvalue_set_xlicclass(icalvalue* value, enum icalproperty_xlicclass v);
  1111. #endif /*ICALVALUE_H*/
  1112. LIBICAL_ICAL_EXPORT icalvalue* icalvalue_new_class(enum icalproperty_class v);
  1113. LIBICAL_ICAL_EXPORT enum icalproperty_class icalvalue_get_class(const icalvalue* value);
  1114. LIBICAL_ICAL_EXPORT void icalvalue_set_class(icalvalue* value, enum icalproperty_class v);
  1115. /*======================================================================
  1116. FILE: icalparam.h
  1117. CREATOR: eric 20 March 1999
  1118. (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
  1119. This program is free software; you can redistribute it and/or modify
  1120. it under the terms of either:
  1121. The LGPL as published by the Free Software Foundation, version
  1122. 2.1, available at: http://www.fsf.org/copyleft/lesser.html
  1123. Or:
  1124. The Mozilla Public License Version 1.0. You may obtain a copy of
  1125. the License at http://www.mozilla.org/MPL/
  1126. The original code is icalparam.h
  1127. ======================================================================*/
  1128. #ifndef ICALDERIVEDPARAMETER_H
  1129. #define ICALDERIVEDPARAMETER_H
  1130. #include "libical_ical_export.h"
  1131. typedef struct icalparameter_impl icalparameter;
  1132. LIBICAL_ICAL_EXPORT const char* icalparameter_enum_to_string(int e);
  1133. LIBICAL_ICAL_EXPORT int icalparameter_string_to_enum(const char* str);
  1134. /* START of section of machine generated code (mkderivedparameters.pl). Do not edit. */
  1135. typedef enum icalparameter_kind {
  1136. ICAL_ANY_PARAMETER = 0,
  1137. ICAL_ACTIONPARAM_PARAMETER = 1,
  1138. ICAL_ALTREP_PARAMETER = 2,
  1139. ICAL_CHARSET_PARAMETER = 3,
  1140. ICAL_CN_PARAMETER = 4,
  1141. ICAL_CUTYPE_PARAMETER = 5,
  1142. ICAL_DELEGATEDFROM_PARAMETER = 6,
  1143. ICAL_DELEGATEDTO_PARAMETER = 7,
  1144. ICAL_DIR_PARAMETER = 8,
  1145. ICAL_ENABLE_PARAMETER = 9,
  1146. ICAL_ENCODING_PARAMETER = 10,
  1147. ICAL_FBTYPE_PARAMETER = 11,
  1148. ICAL_FILENAME_PARAMETER = 42,
  1149. ICAL_FMTTYPE_PARAMETER = 12,
  1150. ICAL_IANA_PARAMETER = 33,
  1151. ICAL_ID_PARAMETER = 13,
  1152. ICAL_LANGUAGE_PARAMETER = 14,
  1153. ICAL_LATENCY_PARAMETER = 15,
  1154. ICAL_LOCAL_PARAMETER = 16,
  1155. ICAL_LOCALIZE_PARAMETER = 17,
  1156. ICAL_MANAGEDID_PARAMETER = 40,
  1157. ICAL_MEMBER_PARAMETER = 18,
  1158. ICAL_MODIFIED_PARAMETER = 44,
  1159. ICAL_OPTIONS_PARAMETER = 19,
  1160. ICAL_PARTSTAT_PARAMETER = 20,
  1161. ICAL_PUBLICCOMMENT_PARAMETER = 37,
  1162. ICAL_RANGE_PARAMETER = 21,
  1163. ICAL_REASON_PARAMETER = 43,
  1164. ICAL_RELATED_PARAMETER = 22,
  1165. ICAL_RELTYPE_PARAMETER = 23,
  1166. ICAL_REQUIRED_PARAMETER = 43,
  1167. ICAL_RESPONSE_PARAMETER = 38,
  1168. ICAL_ROLE_PARAMETER = 24,
  1169. ICAL_RSVP_PARAMETER = 25,
  1170. ICAL_SCHEDULEAGENT_PARAMETER = 34,
  1171. ICAL_SCHEDULEFORCESEND_PARAMETER = 35,
  1172. ICAL_SCHEDULESTATUS_PARAMETER = 36,
  1173. ICAL_SENTBY_PARAMETER = 26,
  1174. ICAL_SIZE_PARAMETER = 41,
  1175. ICAL_STAYINFORMED_PARAMETER = 39,
  1176. ICAL_SUBSTATE_PARAMETER = 45,
  1177. ICAL_TZID_PARAMETER = 27,
  1178. ICAL_VALUE_PARAMETER = 28,
  1179. ICAL_X_PARAMETER = 29,
  1180. ICAL_XLICCOMPARETYPE_PARAMETER = 30,
  1181. ICAL_XLICERRORTYPE_PARAMETER = 31,
  1182. ICAL_NO_PARAMETER = 32
  1183. } icalparameter_kind;
  1184. #define ICALPARAMETER_FIRST_ENUM 20000
  1185. typedef enum icalparameter_action {
  1186. ICAL_ACTIONPARAM_X = 20000,
  1187. ICAL_ACTIONPARAM_ASK = 20001,
  1188. ICAL_ACTIONPARAM_ABORT = 20002,
  1189. ICAL_ACTIONPARAM_NONE = 20099
  1190. } icalparameter_action;
  1191. typedef enum icalparameter_cutype {
  1192. ICAL_CUTYPE_X = 20100,
  1193. ICAL_CUTYPE_INDIVIDUAL = 20101,
  1194. ICAL_CUTYPE_GROUP = 20102,
  1195. ICAL_CUTYPE_RESOURCE = 20103,
  1196. ICAL_CUTYPE_ROOM = 20104,
  1197. ICAL_CUTYPE_UNKNOWN = 20105,
  1198. ICAL_CUTYPE_NONE = 20199
  1199. } icalparameter_cutype;
  1200. typedef enum icalparameter_enable {
  1201. ICAL_ENABLE_X = 20200,
  1202. ICAL_ENABLE_TRUE = 20201,
  1203. ICAL_ENABLE_FALSE = 20202,
  1204. ICAL_ENABLE_NONE = 20299
  1205. } icalparameter_enable;
  1206. typedef enum icalparameter_encoding {
  1207. ICAL_ENCODING_X = 20300,
  1208. ICAL_ENCODING_8BIT = 20301,
  1209. ICAL_ENCODING_BASE64 = 20302,
  1210. ICAL_ENCODING_NONE = 20399
  1211. } icalparameter_encoding;
  1212. typedef enum icalparameter_fbtype {
  1213. ICAL_FBTYPE_X = 20400,
  1214. ICAL_FBTYPE_FREE = 20401,
  1215. ICAL_FBTYPE_BUSY = 20402,
  1216. ICAL_FBTYPE_BUSYUNAVAILABLE = 20403,
  1217. ICAL_FBTYPE_BUSYTENTATIVE = 20404,
  1218. ICAL_FBTYPE_NONE = 20499
  1219. } icalparameter_fbtype;
  1220. typedef enum icalparameter_local {
  1221. ICAL_LOCAL_X = 20500,
  1222. ICAL_LOCAL_TRUE = 20501,
  1223. ICAL_LOCAL_FALSE = 20502,
  1224. ICAL_LOCAL_NONE = 20599
  1225. } icalparameter_local;
  1226. typedef enum icalparameter_partstat {
  1227. ICAL_PARTSTAT_X = 20600,
  1228. ICAL_PARTSTAT_NEEDSACTION = 20601,
  1229. ICAL_PARTSTAT_ACCEPTED = 20602,
  1230. ICAL_PARTSTAT_DECLINED = 20603,
  1231. ICAL_PARTSTAT_TENTATIVE = 20604,
  1232. ICAL_PARTSTAT_DELEGATED = 20605,
  1233. ICAL_PARTSTAT_COMPLETED = 20606,
  1234. ICAL_PARTSTAT_INPROCESS = 20607,
  1235. ICAL_PARTSTAT_FAILED = 20608,
  1236. ICAL_PARTSTAT_NONE = 20699
  1237. } icalparameter_partstat;
  1238. typedef enum icalparameter_range {
  1239. ICAL_RANGE_X = 20700,
  1240. ICAL_RANGE_THISANDPRIOR = 20701,
  1241. ICAL_RANGE_THISANDFUTURE = 20702,
  1242. ICAL_RANGE_NONE = 20799
  1243. } icalparameter_range;
  1244. typedef enum icalparameter_related {
  1245. ICAL_RELATED_X = 20800,
  1246. ICAL_RELATED_START = 20801,
  1247. ICAL_RELATED_END = 20802,
  1248. ICAL_RELATED_NONE = 20899
  1249. } icalparameter_related;
  1250. typedef enum icalparameter_reltype {
  1251. ICAL_RELTYPE_X = 20900,
  1252. ICAL_RELTYPE_PARENT = 20901,
  1253. ICAL_RELTYPE_CHILD = 20902,
  1254. ICAL_RELTYPE_SIBLING = 20903,
  1255. ICAL_RELTYPE_POLL = 20904,
  1256. ICAL_RELTYPE_NONE = 20999
  1257. } icalparameter_reltype;
  1258. typedef enum icalparameter_required {
  1259. ICAL_REQUIRED_X = 21000,
  1260. ICAL_REQUIRED_TRUE = 21001,
  1261. ICAL_REQUIRED_FALSE = 21002,
  1262. ICAL_REQUIRED_NONE = 21099
  1263. } icalparameter_required;
  1264. typedef enum icalparameter_role {
  1265. ICAL_ROLE_X = 21100,
  1266. ICAL_ROLE_CHAIR = 21101,
  1267. ICAL_ROLE_REQPARTICIPANT = 21102,
  1268. ICAL_ROLE_OPTPARTICIPANT = 21103,
  1269. ICAL_ROLE_NONPARTICIPANT = 21104,
  1270. ICAL_ROLE_NONE = 21199
  1271. } icalparameter_role;
  1272. typedef enum icalparameter_rsvp {
  1273. ICAL_RSVP_X = 21200,
  1274. ICAL_RSVP_TRUE = 21201,
  1275. ICAL_RSVP_FALSE = 21202,
  1276. ICAL_RSVP_NONE = 21299
  1277. } icalparameter_rsvp;
  1278. typedef enum icalparameter_scheduleagent {
  1279. ICAL_SCHEDULEAGENT_X = 21300,
  1280. ICAL_SCHEDULEAGENT_SERVER = 21301,
  1281. ICAL_SCHEDULEAGENT_CLIENT = 21302,
  1282. ICAL_SCHEDULEAGENT_NONE = 21399
  1283. } icalparameter_scheduleagent;
  1284. typedef enum icalparameter_scheduleforcesend {
  1285. ICAL_SCHEDULEFORCESEND_X = 21400,
  1286. ICAL_SCHEDULEFORCESEND_REQUEST = 21401,
  1287. ICAL_SCHEDULEFORCESEND_REPLY = 21402,
  1288. ICAL_SCHEDULEFORCESEND_NONE = 21499
  1289. } icalparameter_scheduleforcesend;
  1290. typedef enum icalparameter_stayinformed {
  1291. ICAL_STAYINFORMED_X = 21500,
  1292. ICAL_STAYINFORMED_TRUE = 21501,
  1293. ICAL_STAYINFORMED_FALSE = 21502,
  1294. ICAL_STAYINFORMED_NONE = 21599
  1295. } icalparameter_stayinformed;
  1296. typedef enum icalparameter_substate {
  1297. ICAL_SUBSTATE_X = 21900,
  1298. ICAL_SUBSTATE_OK = 21901,
  1299. ICAL_SUBSTATE_ERROR = 21902,
  1300. ICAL_SUBSTATE_SUSPENDED = 21903,
  1301. ICAL_SUBSTATE_NONE = 21999
  1302. } icalparameter_substate;
  1303. typedef enum icalparameter_value {
  1304. ICAL_VALUE_X = 21600,
  1305. ICAL_VALUE_BINARY = 21601,
  1306. ICAL_VALUE_BOOLEAN = 21602,
  1307. ICAL_VALUE_DATE = 21603,
  1308. ICAL_VALUE_DURATION = 21604,
  1309. ICAL_VALUE_FLOAT = 21605,
  1310. ICAL_VALUE_INTEGER = 21606,
  1311. ICAL_VALUE_PERIOD = 21607,
  1312. ICAL_VALUE_RECUR = 21608,
  1313. ICAL_VALUE_TEXT = 21609,
  1314. ICAL_VALUE_URI = 21610,
  1315. ICAL_VALUE_ERROR = 21611,
  1316. ICAL_VALUE_DATETIME = 21612,
  1317. ICAL_VALUE_UTCOFFSET = 21613,
  1318. ICAL_VALUE_CALADDRESS = 21614,
  1319. ICAL_VALUE_NONE = 21699
  1320. } icalparameter_value;
  1321. typedef enum icalparameter_xliccomparetype {
  1322. ICAL_XLICCOMPARETYPE_X = 21700,
  1323. ICAL_XLICCOMPARETYPE_EQUAL = 21701,
  1324. ICAL_XLICCOMPARETYPE_NOTEQUAL = 21702,
  1325. ICAL_XLICCOMPARETYPE_LESS = 21703,
  1326. ICAL_XLICCOMPARETYPE_GREATER = 21704,
  1327. ICAL_XLICCOMPARETYPE_LESSEQUAL = 21705,
  1328. ICAL_XLICCOMPARETYPE_GREATEREQUAL = 21706,
  1329. ICAL_XLICCOMPARETYPE_REGEX = 21707,
  1330. ICAL_XLICCOMPARETYPE_ISNULL = 21708,
  1331. ICAL_XLICCOMPARETYPE_ISNOTNULL = 21709,
  1332. ICAL_XLICCOMPARETYPE_NONE = 21799
  1333. } icalparameter_xliccomparetype;
  1334. typedef enum icalparameter_xlicerrortype {
  1335. ICAL_XLICERRORTYPE_X = 21800,
  1336. ICAL_XLICERRORTYPE_COMPONENTPARSEERROR = 21801,
  1337. ICAL_XLICERRORTYPE_PROPERTYPARSEERROR = 21802,
  1338. ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR = 21803,
  1339. ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR = 21804,
  1340. ICAL_XLICERRORTYPE_VALUEPARSEERROR = 21805,
  1341. ICAL_XLICERRORTYPE_INVALIDITIP = 21806,
  1342. ICAL_XLICERRORTYPE_UNKNOWNVCALPROPERROR = 21807,
  1343. ICAL_XLICERRORTYPE_MIMEPARSEERROR = 21808,
  1344. ICAL_XLICERRORTYPE_VCALPROPPARSEERROR = 21809,
  1345. ICAL_XLICERRORTYPE_NONE = 21899
  1346. } icalparameter_xlicerrortype;
  1347. #define ICALPARAMETER_LAST_ENUM 22000
  1348. /* ACTIONPARAM */
  1349. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_actionparam(icalparameter_action v);
  1350. LIBICAL_ICAL_EXPORT icalparameter_action icalparameter_get_actionparam(const icalparameter* value);
  1351. LIBICAL_ICAL_EXPORT void icalparameter_set_actionparam(icalparameter* value, icalparameter_action v);
  1352. /* ALTREP */
  1353. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_altrep(const char* v);
  1354. LIBICAL_ICAL_EXPORT const char* icalparameter_get_altrep(const icalparameter* value);
  1355. LIBICAL_ICAL_EXPORT void icalparameter_set_altrep(icalparameter* value, const char* v);
  1356. /* CHARSET */
  1357. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_charset(const char* v);
  1358. LIBICAL_ICAL_EXPORT const char* icalparameter_get_charset(const icalparameter* value);
  1359. LIBICAL_ICAL_EXPORT void icalparameter_set_charset(icalparameter* value, const char* v);
  1360. /* CN */
  1361. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_cn(const char* v);
  1362. LIBICAL_ICAL_EXPORT const char* icalparameter_get_cn(const icalparameter* value);
  1363. LIBICAL_ICAL_EXPORT void icalparameter_set_cn(icalparameter* value, const char* v);
  1364. /* CUTYPE */
  1365. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_cutype(icalparameter_cutype v);
  1366. LIBICAL_ICAL_EXPORT icalparameter_cutype icalparameter_get_cutype(const icalparameter* value);
  1367. LIBICAL_ICAL_EXPORT void icalparameter_set_cutype(icalparameter* value, icalparameter_cutype v);
  1368. /* DELEGATED-FROM */
  1369. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_delegatedfrom(const char* v);
  1370. LIBICAL_ICAL_EXPORT const char* icalparameter_get_delegatedfrom(const icalparameter* value);
  1371. LIBICAL_ICAL_EXPORT void icalparameter_set_delegatedfrom(icalparameter* value, const char* v);
  1372. /* DELEGATED-TO */
  1373. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_delegatedto(const char* v);
  1374. LIBICAL_ICAL_EXPORT const char* icalparameter_get_delegatedto(const icalparameter* value);
  1375. LIBICAL_ICAL_EXPORT void icalparameter_set_delegatedto(icalparameter* value, const char* v);
  1376. /* DIR */
  1377. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_dir(const char* v);
  1378. LIBICAL_ICAL_EXPORT const char* icalparameter_get_dir(const icalparameter* value);
  1379. LIBICAL_ICAL_EXPORT void icalparameter_set_dir(icalparameter* value, const char* v);
  1380. /* ENABLE */
  1381. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_enable(icalparameter_enable v);
  1382. LIBICAL_ICAL_EXPORT icalparameter_enable icalparameter_get_enable(const icalparameter* value);
  1383. LIBICAL_ICAL_EXPORT void icalparameter_set_enable(icalparameter* value, icalparameter_enable v);
  1384. /* ENCODING */
  1385. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_encoding(icalparameter_encoding v);
  1386. LIBICAL_ICAL_EXPORT icalparameter_encoding icalparameter_get_encoding(const icalparameter* value);
  1387. LIBICAL_ICAL_EXPORT void icalparameter_set_encoding(icalparameter* value, icalparameter_encoding v);
  1388. /* FBTYPE */
  1389. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_fbtype(icalparameter_fbtype v);
  1390. LIBICAL_ICAL_EXPORT icalparameter_fbtype icalparameter_get_fbtype(const icalparameter* value);
  1391. LIBICAL_ICAL_EXPORT void icalparameter_set_fbtype(icalparameter* value, icalparameter_fbtype v);
  1392. /* FILENAME */
  1393. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_filename(const char* v);
  1394. LIBICAL_ICAL_EXPORT const char* icalparameter_get_filename(const icalparameter* value);
  1395. LIBICAL_ICAL_EXPORT void icalparameter_set_filename(icalparameter* value, const char* v);
  1396. /* FMTTYPE */
  1397. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_fmttype(const char* v);
  1398. LIBICAL_ICAL_EXPORT const char* icalparameter_get_fmttype(const icalparameter* value);
  1399. LIBICAL_ICAL_EXPORT void icalparameter_set_fmttype(icalparameter* value, const char* v);
  1400. /* IANA */
  1401. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_iana(const char* v);
  1402. LIBICAL_ICAL_EXPORT const char* icalparameter_get_iana(const icalparameter* value);
  1403. LIBICAL_ICAL_EXPORT void icalparameter_set_iana(icalparameter* value, const char* v);
  1404. /* ID */
  1405. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_id(const char* v);
  1406. LIBICAL_ICAL_EXPORT const char* icalparameter_get_id(const icalparameter* value);
  1407. LIBICAL_ICAL_EXPORT void icalparameter_set_id(icalparameter* value, const char* v);
  1408. /* LANGUAGE */
  1409. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_language(const char* v);
  1410. LIBICAL_ICAL_EXPORT const char* icalparameter_get_language(const icalparameter* value);
  1411. LIBICAL_ICAL_EXPORT void icalparameter_set_language(icalparameter* value, const char* v);
  1412. /* LATENCY */
  1413. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_latency(const char* v);
  1414. LIBICAL_ICAL_EXPORT const char* icalparameter_get_latency(const icalparameter* value);
  1415. LIBICAL_ICAL_EXPORT void icalparameter_set_latency(icalparameter* value, const char* v);
  1416. /* LOCAL */
  1417. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_local(icalparameter_local v);
  1418. LIBICAL_ICAL_EXPORT icalparameter_local icalparameter_get_local(const icalparameter* value);
  1419. LIBICAL_ICAL_EXPORT void icalparameter_set_local(icalparameter* value, icalparameter_local v);
  1420. /* LOCALIZE */
  1421. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_localize(const char* v);
  1422. LIBICAL_ICAL_EXPORT const char* icalparameter_get_localize(const icalparameter* value);
  1423. LIBICAL_ICAL_EXPORT void icalparameter_set_localize(icalparameter* value, const char* v);
  1424. /* MANAGED-ID */
  1425. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_managedid(const char* v);
  1426. LIBICAL_ICAL_EXPORT const char* icalparameter_get_managedid(const icalparameter* value);
  1427. LIBICAL_ICAL_EXPORT void icalparameter_set_managedid(icalparameter* value, const char* v);
  1428. /* MEMBER */
  1429. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_member(const char* v);
  1430. LIBICAL_ICAL_EXPORT const char* icalparameter_get_member(const icalparameter* value);
  1431. LIBICAL_ICAL_EXPORT void icalparameter_set_member(icalparameter* value, const char* v);
  1432. /* MODIFIED */
  1433. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_modified(const char* v);
  1434. LIBICAL_ICAL_EXPORT const char* icalparameter_get_modified(const icalparameter* value);
  1435. LIBICAL_ICAL_EXPORT void icalparameter_set_modified(icalparameter* value, const char* v);
  1436. /* OPTIONS */
  1437. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_options(const char* v);
  1438. LIBICAL_ICAL_EXPORT const char* icalparameter_get_options(const icalparameter* value);
  1439. LIBICAL_ICAL_EXPORT void icalparameter_set_options(icalparameter* value, const char* v);
  1440. /* PARTSTAT */
  1441. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_partstat(icalparameter_partstat v);
  1442. LIBICAL_ICAL_EXPORT icalparameter_partstat icalparameter_get_partstat(const icalparameter* value);
  1443. LIBICAL_ICAL_EXPORT void icalparameter_set_partstat(icalparameter* value, icalparameter_partstat v);
  1444. /* PUBLIC-COMMENT */
  1445. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_publiccomment(const char* v);
  1446. LIBICAL_ICAL_EXPORT const char* icalparameter_get_publiccomment(const icalparameter* value);
  1447. LIBICAL_ICAL_EXPORT void icalparameter_set_publiccomment(icalparameter* value, const char* v);
  1448. /* RANGE */
  1449. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_range(icalparameter_range v);
  1450. LIBICAL_ICAL_EXPORT icalparameter_range icalparameter_get_range(const icalparameter* value);
  1451. LIBICAL_ICAL_EXPORT void icalparameter_set_range(icalparameter* value, icalparameter_range v);
  1452. /* REASON */
  1453. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_reason(const char* v);
  1454. LIBICAL_ICAL_EXPORT const char* icalparameter_get_reason(const icalparameter* value);
  1455. LIBICAL_ICAL_EXPORT void icalparameter_set_reason(icalparameter* value, const char* v);
  1456. /* RELATED */
  1457. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_related(icalparameter_related v);
  1458. LIBICAL_ICAL_EXPORT icalparameter_related icalparameter_get_related(const icalparameter* value);
  1459. LIBICAL_ICAL_EXPORT void icalparameter_set_related(icalparameter* value, icalparameter_related v);
  1460. /* RELTYPE */
  1461. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_reltype(icalparameter_reltype v);
  1462. LIBICAL_ICAL_EXPORT icalparameter_reltype icalparameter_get_reltype(const icalparameter* value);
  1463. LIBICAL_ICAL_EXPORT void icalparameter_set_reltype(icalparameter* value, icalparameter_reltype v);
  1464. /* REQUIRED */
  1465. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_required(icalparameter_required v);
  1466. LIBICAL_ICAL_EXPORT icalparameter_required icalparameter_get_required(const icalparameter* value);
  1467. LIBICAL_ICAL_EXPORT void icalparameter_set_required(icalparameter* value, icalparameter_required v);
  1468. /* RESPONSE */
  1469. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_response(int v);
  1470. LIBICAL_ICAL_EXPORT int icalparameter_get_response(const icalparameter* value);
  1471. LIBICAL_ICAL_EXPORT void icalparameter_set_response(icalparameter* value, int v);
  1472. /* ROLE */
  1473. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_role(icalparameter_role v);
  1474. LIBICAL_ICAL_EXPORT icalparameter_role icalparameter_get_role(const icalparameter* value);
  1475. LIBICAL_ICAL_EXPORT void icalparameter_set_role(icalparameter* value, icalparameter_role v);
  1476. /* RSVP */
  1477. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_rsvp(icalparameter_rsvp v);
  1478. LIBICAL_ICAL_EXPORT icalparameter_rsvp icalparameter_get_rsvp(const icalparameter* value);
  1479. LIBICAL_ICAL_EXPORT void icalparameter_set_rsvp(icalparameter* value, icalparameter_rsvp v);
  1480. /* SCHEDULE-AGENT */
  1481. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_scheduleagent(icalparameter_scheduleagent v);
  1482. LIBICAL_ICAL_EXPORT icalparameter_scheduleagent icalparameter_get_scheduleagent(const icalparameter* value);
  1483. LIBICAL_ICAL_EXPORT void icalparameter_set_scheduleagent(icalparameter* value, icalparameter_scheduleagent v);
  1484. /* SCHEDULE-FORCE-SEND */
  1485. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_scheduleforcesend(icalparameter_scheduleforcesend v);
  1486. LIBICAL_ICAL_EXPORT icalparameter_scheduleforcesend icalparameter_get_scheduleforcesend(const icalparameter* value);
  1487. LIBICAL_ICAL_EXPORT void icalparameter_set_scheduleforcesend(icalparameter* value, icalparameter_scheduleforcesend v);
  1488. /* SCHEDULE-STATUS */
  1489. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_schedulestatus(const char* v);
  1490. LIBICAL_ICAL_EXPORT const char* icalparameter_get_schedulestatus(const icalparameter* value);
  1491. LIBICAL_ICAL_EXPORT void icalparameter_set_schedulestatus(icalparameter* value, const char* v);
  1492. /* SENT-BY */
  1493. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_sentby(const char* v);
  1494. LIBICAL_ICAL_EXPORT const char* icalparameter_get_sentby(const icalparameter* value);
  1495. LIBICAL_ICAL_EXPORT void icalparameter_set_sentby(icalparameter* value, const char* v);
  1496. /* SIZE */
  1497. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_size(const char* v);
  1498. LIBICAL_ICAL_EXPORT const char* icalparameter_get_size(const icalparameter* value);
  1499. LIBICAL_ICAL_EXPORT void icalparameter_set_size(icalparameter* value, const char* v);
  1500. /* STAY-INFORMED */
  1501. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_stayinformed(icalparameter_stayinformed v);
  1502. LIBICAL_ICAL_EXPORT icalparameter_stayinformed icalparameter_get_stayinformed(const icalparameter* value);
  1503. LIBICAL_ICAL_EXPORT void icalparameter_set_stayinformed(icalparameter* value, icalparameter_stayinformed v);
  1504. /* SUBSTATE */
  1505. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_substate(icalparameter_substate v);
  1506. LIBICAL_ICAL_EXPORT icalparameter_substate icalparameter_get_substate(const icalparameter* value);
  1507. LIBICAL_ICAL_EXPORT void icalparameter_set_substate(icalparameter* value, icalparameter_substate v);
  1508. /* TZID */
  1509. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_tzid(const char* v);
  1510. LIBICAL_ICAL_EXPORT const char* icalparameter_get_tzid(const icalparameter* value);
  1511. LIBICAL_ICAL_EXPORT void icalparameter_set_tzid(icalparameter* value, const char* v);
  1512. /* VALUE */
  1513. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_value(icalparameter_value v);
  1514. LIBICAL_ICAL_EXPORT icalparameter_value icalparameter_get_value(const icalparameter* value);
  1515. LIBICAL_ICAL_EXPORT void icalparameter_set_value(icalparameter* value, icalparameter_value v);
  1516. /* X */
  1517. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_x(const char* v);
  1518. LIBICAL_ICAL_EXPORT const char* icalparameter_get_x(const icalparameter* value);
  1519. LIBICAL_ICAL_EXPORT void icalparameter_set_x(icalparameter* value, const char* v);
  1520. /* X-LIC-COMPARETYPE */
  1521. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_xliccomparetype(icalparameter_xliccomparetype v);
  1522. LIBICAL_ICAL_EXPORT icalparameter_xliccomparetype icalparameter_get_xliccomparetype(const icalparameter* value);
  1523. LIBICAL_ICAL_EXPORT void icalparameter_set_xliccomparetype(icalparameter* value, icalparameter_xliccomparetype v);
  1524. /* X-LIC-ERRORTYPE */
  1525. LIBICAL_ICAL_EXPORT icalparameter* icalparameter_new_xlicerrortype(icalparameter_xlicerrortype v);
  1526. LIBICAL_ICAL_EXPORT icalparameter_xlicerrortype icalparameter_get_xlicerrortype(const icalparameter* value);
  1527. LIBICAL_ICAL_EXPORT void icalparameter_set_xlicerrortype(icalparameter* value, icalparameter_xlicerrortype v);
  1528. #endif /*ICALPARAMETER_H*/
  1529. /* END of section of machine generated code (mkderivedparameters.pl). Do not edit. */
  1530. /*======================================================================
  1531. FILE: icalvalue.h
  1532. CREATOR: eric 20 March 1999
  1533. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  1534. http://www.softwarestudio.org
  1535. This program is free software; you can redistribute it and/or modify
  1536. it under the terms of either:
  1537. The LGPL as published by the Free Software Foundation, version
  1538. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  1539. Or:
  1540. The Mozilla Public License Version 1.0. You may obtain a copy of
  1541. the License at http://www.mozilla.org/MPL/
  1542. ======================================================================*/
  1543. #ifndef ICALVALUE_H
  1544. #define ICALVALUE_H
  1545. #include "libical_ical_export.h"
  1546. LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new(icalvalue_kind kind);
  1547. LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new_clone(const icalvalue *value);
  1548. LIBICAL_ICAL_EXPORT icalvalue *icalvalue_new_from_string(icalvalue_kind kind, const char *str);
  1549. LIBICAL_ICAL_EXPORT void icalvalue_free(icalvalue *value);
  1550. LIBICAL_ICAL_EXPORT int icalvalue_is_valid(const icalvalue *value);
  1551. LIBICAL_ICAL_EXPORT const char *icalvalue_as_ical_string(const icalvalue *value);
  1552. LIBICAL_ICAL_EXPORT char *icalvalue_as_ical_string_r(const icalvalue *value);
  1553. LIBICAL_ICAL_EXPORT icalvalue_kind icalvalue_isa(const icalvalue *value);
  1554. LIBICAL_ICAL_EXPORT int icalvalue_isa_value(void *);
  1555. LIBICAL_ICAL_EXPORT icalparameter_xliccomparetype icalvalue_compare(const icalvalue *a,
  1556. const icalvalue *b);
  1557. /* Special, non autogenerated value accessors */
  1558. /* Defined in icalderivedvalue.h */
  1559. /* icalvalue* icalvalue_new_recur (struct icalrecurrencetype v); */
  1560. /* void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v); */
  1561. /* struct icalrecurrencetype icalvalue_get_recur(const icalvalue* value); */
  1562. /* icalvalue* icalvalue_new_trigger (struct icaltriggertype v); */
  1563. /* void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v); */
  1564. /* struct icaltriggertype icalvalue_get_trigger(const icalvalue* value); */
  1565. /* icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v); */
  1566. /* void icalvalue_set_datetimeperiod(icalvalue* value, */
  1567. /* struct icaldatetimeperiodtype v); */
  1568. /* struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* value); */
  1569. /* Convert enumerations */
  1570. LIBICAL_ICAL_EXPORT icalvalue_kind icalvalue_string_to_kind(const char *str);
  1571. LIBICAL_ICAL_EXPORT const char *icalvalue_kind_to_string(const icalvalue_kind kind);
  1572. /** Check validity of a specific icalvalue_kind **/
  1573. LIBICAL_ICAL_EXPORT int icalvalue_kind_is_valid(const icalvalue_kind kind);
  1574. /** Encode a character string in ical format, esacpe certain characters, etc. */
  1575. LIBICAL_ICAL_EXPORT int icalvalue_encode_ical_string(const char *szText,
  1576. char *szEncText, int MaxBufferLen);
  1577. /** Extract the original character string encoded by the above function **/
  1578. LIBICAL_ICAL_EXPORT int icalvalue_decode_ical_string(const char *szText,
  1579. char *szDecText, int nMaxBufferLen);
  1580. /* For the library only -- do not make visible */
  1581. extern void print_date_to_string(char *str, const struct icaltimetype *data);
  1582. extern void print_datetime_to_string(char *str, const struct icaltimetype *data);
  1583. #endif /*ICALVALUE_H */
  1584. /*======================================================================
  1585. FILE: icalparam.h
  1586. CREATOR: eric 20 March 1999
  1587. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  1588. http://www.softwarestudio.org
  1589. This program is free software; you can redistribute it and/or modify
  1590. it under the terms of either:
  1591. The LGPL as published by the Free Software Foundation, version
  1592. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  1593. Or:
  1594. The Mozilla Public License Version 1.0. You may obtain a copy of
  1595. the License at http://www.mozilla.org/MPL/
  1596. ======================================================================*/
  1597. #ifndef ICALPARAMETER_H
  1598. #define ICALPARAMETER_H
  1599. #include "libical_ical_export.h"
  1600. /* Declared in icalderivedparameter.h */
  1601. /*typedef struct icalparameter_impl icalparameter;*/
  1602. LIBICAL_ICAL_EXPORT icalparameter *icalparameter_new(icalparameter_kind kind);
  1603. LIBICAL_ICAL_EXPORT icalparameter *icalparameter_new_clone(icalparameter *p);
  1604. /* Create from string of form "PARAMNAME=VALUE" */
  1605. LIBICAL_ICAL_EXPORT icalparameter *icalparameter_new_from_string(const char *value);
  1606. /* Create from just the value, the part after the "=" */
  1607. LIBICAL_ICAL_EXPORT icalparameter *icalparameter_new_from_value_string(icalparameter_kind kind,
  1608. const char *value);
  1609. LIBICAL_ICAL_EXPORT void icalparameter_free(icalparameter *parameter);
  1610. LIBICAL_ICAL_EXPORT char *icalparameter_as_ical_string(icalparameter *parameter);
  1611. LIBICAL_ICAL_EXPORT char *icalparameter_as_ical_string_r(icalparameter *parameter);
  1612. LIBICAL_ICAL_EXPORT int icalparameter_is_valid(icalparameter *parameter);
  1613. LIBICAL_ICAL_EXPORT icalparameter_kind icalparameter_isa(icalparameter *parameter);
  1614. LIBICAL_ICAL_EXPORT int icalparameter_isa_parameter(void *param);
  1615. /* Access the name of an X parameter */
  1616. LIBICAL_ICAL_EXPORT void icalparameter_set_xname(icalparameter *param, const char *v);
  1617. LIBICAL_ICAL_EXPORT const char *icalparameter_get_xname(icalparameter *param);
  1618. LIBICAL_ICAL_EXPORT void icalparameter_set_xvalue(icalparameter *param, const char *v);
  1619. LIBICAL_ICAL_EXPORT const char *icalparameter_get_xvalue(icalparameter *param);
  1620. /* Access the name of an IANA parameter */
  1621. LIBICAL_ICAL_EXPORT void icalparameter_set_iana_name(icalparameter *param, const char *v);
  1622. LIBICAL_ICAL_EXPORT const char *icalparameter_get_iana_name(icalparameter *param);
  1623. LIBICAL_ICAL_EXPORT void icalparameter_set_iana_value(icalparameter *param, const char *v);
  1624. LIBICAL_ICAL_EXPORT const char *icalparameter_get_iana_value(icalparameter *param);
  1625. /* returns 1 if parameters have same name in ICAL, otherwise 0 */
  1626. LIBICAL_ICAL_EXPORT int icalparameter_has_same_name(icalparameter *param1, icalparameter *param2);
  1627. /* Convert enumerations */
  1628. LIBICAL_ICAL_EXPORT const char *icalparameter_kind_to_string(icalparameter_kind kind);
  1629. LIBICAL_ICAL_EXPORT icalparameter_kind icalparameter_string_to_kind(const char *string);
  1630. #endif
  1631. /* -*- Mode: C -*-
  1632. ======================================================================
  1633. FILE: icalderivedproperties.{c,h}
  1634. CREATOR: eric 09 May 1999
  1635. $Id: icalderivedproperty.h.in,v 1.7 2007-04-30 13:57:48 artcancro Exp $
  1636. This program is free software; you can redistribute it and/or modify
  1637. it under the terms of either:
  1638. The LGPL as published by the Free Software Foundation, version
  1639. 2.1, available at: http://www.fsf.org/copyleft/lesser.html
  1640. Or:
  1641. The Mozilla Public License Version 1.0. You may obtain a copy of
  1642. the License at http://www.mozilla.org/MPL/
  1643. (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
  1644. ======================================================================*/
  1645. #ifndef ICALDERIVEDPROPERTY_H
  1646. #define ICALDERIVEDPROPERTY_H
  1647. #include <time.h>
  1648. typedef struct icalproperty_impl icalproperty;
  1649. typedef enum icalproperty_kind {
  1650. ICAL_ANY_PROPERTY = 0,
  1651. ICAL_ACCEPTRESPONSE_PROPERTY = 102,
  1652. ICAL_ACKNOWLEDGED_PROPERTY = 1,
  1653. ICAL_ACTION_PROPERTY = 2,
  1654. ICAL_ALLOWCONFLICT_PROPERTY = 3,
  1655. ICAL_ATTACH_PROPERTY = 4,
  1656. ICAL_ATTENDEE_PROPERTY = 5,
  1657. ICAL_BUSYTYPE_PROPERTY = 101,
  1658. ICAL_CALID_PROPERTY = 6,
  1659. ICAL_CALMASTER_PROPERTY = 7,
  1660. ICAL_CALSCALE_PROPERTY = 8,
  1661. ICAL_CAPVERSION_PROPERTY = 9,
  1662. ICAL_CARLEVEL_PROPERTY = 10,
  1663. ICAL_CARID_PROPERTY = 11,
  1664. ICAL_CATEGORIES_PROPERTY = 12,
  1665. ICAL_CLASS_PROPERTY = 13,
  1666. ICAL_CMD_PROPERTY = 14,
  1667. ICAL_COMMENT_PROPERTY = 15,
  1668. ICAL_COMPLETED_PROPERTY = 16,
  1669. ICAL_COMPONENTS_PROPERTY = 17,
  1670. ICAL_CONTACT_PROPERTY = 18,
  1671. ICAL_CREATED_PROPERTY = 19,
  1672. ICAL_CSID_PROPERTY = 20,
  1673. ICAL_DATEMAX_PROPERTY = 21,
  1674. ICAL_DATEMIN_PROPERTY = 22,
  1675. ICAL_DECREED_PROPERTY = 23,
  1676. ICAL_DEFAULTCHARSET_PROPERTY = 24,
  1677. ICAL_DEFAULTLOCALE_PROPERTY = 25,
  1678. ICAL_DEFAULTTZID_PROPERTY = 26,
  1679. ICAL_DEFAULTVCARS_PROPERTY = 27,
  1680. ICAL_DENY_PROPERTY = 28,
  1681. ICAL_DESCRIPTION_PROPERTY = 29,
  1682. ICAL_DTEND_PROPERTY = 30,
  1683. ICAL_DTSTAMP_PROPERTY = 31,
  1684. ICAL_DTSTART_PROPERTY = 32,
  1685. ICAL_DUE_PROPERTY = 33,
  1686. ICAL_DURATION_PROPERTY = 34,
  1687. ICAL_ESTIMATEDDURATION_PROPERTY = 113,
  1688. ICAL_EXDATE_PROPERTY = 35,
  1689. ICAL_EXPAND_PROPERTY = 36,
  1690. ICAL_EXRULE_PROPERTY = 37,
  1691. ICAL_FREEBUSY_PROPERTY = 38,
  1692. ICAL_GEO_PROPERTY = 39,
  1693. ICAL_GRANT_PROPERTY = 40,
  1694. ICAL_ITIPVERSION_PROPERTY = 41,
  1695. ICAL_LASTMODIFIED_PROPERTY = 42,
  1696. ICAL_LOCATION_PROPERTY = 43,
  1697. ICAL_MAXCOMPONENTSIZE_PROPERTY = 44,
  1698. ICAL_MAXDATE_PROPERTY = 45,
  1699. ICAL_MAXRESULTS_PROPERTY = 46,
  1700. ICAL_MAXRESULTSSIZE_PROPERTY = 47,
  1701. ICAL_METHOD_PROPERTY = 48,
  1702. ICAL_MINDATE_PROPERTY = 49,
  1703. ICAL_MULTIPART_PROPERTY = 50,
  1704. ICAL_NAME_PROPERTY = 51,
  1705. ICAL_ORGANIZER_PROPERTY = 52,
  1706. ICAL_OWNER_PROPERTY = 53,
  1707. ICAL_PERCENTCOMPLETE_PROPERTY = 54,
  1708. ICAL_PERMISSION_PROPERTY = 55,
  1709. ICAL_POLLCOMPLETION_PROPERTY = 110,
  1710. ICAL_POLLITEMID_PROPERTY = 103,
  1711. ICAL_POLLMODE_PROPERTY = 104,
  1712. ICAL_POLLPROPERTIES_PROPERTY = 105,
  1713. ICAL_POLLWINNER_PROPERTY = 106,
  1714. ICAL_PRIORITY_PROPERTY = 56,
  1715. ICAL_PRODID_PROPERTY = 57,
  1716. ICAL_QUERY_PROPERTY = 58,
  1717. ICAL_QUERYLEVEL_PROPERTY = 59,
  1718. ICAL_QUERYID_PROPERTY = 60,
  1719. ICAL_QUERYNAME_PROPERTY = 61,
  1720. ICAL_RDATE_PROPERTY = 62,
  1721. ICAL_RECURACCEPTED_PROPERTY = 63,
  1722. ICAL_RECUREXPAND_PROPERTY = 64,
  1723. ICAL_RECURLIMIT_PROPERTY = 65,
  1724. ICAL_RECURRENCEID_PROPERTY = 66,
  1725. ICAL_RELATEDTO_PROPERTY = 67,
  1726. ICAL_RELCALID_PROPERTY = 68,
  1727. ICAL_REPEAT_PROPERTY = 69,
  1728. ICAL_REPLYURL_PROPERTY = 111,
  1729. ICAL_REQUESTSTATUS_PROPERTY = 70,
  1730. ICAL_RESOURCES_PROPERTY = 71,
  1731. ICAL_RESPONSE_PROPERTY = 112,
  1732. ICAL_RESTRICTION_PROPERTY = 72,
  1733. ICAL_RRULE_PROPERTY = 73,
  1734. ICAL_SCOPE_PROPERTY = 74,
  1735. ICAL_SEQUENCE_PROPERTY = 75,
  1736. ICAL_STATUS_PROPERTY = 76,
  1737. ICAL_STORESEXPANDED_PROPERTY = 77,
  1738. ICAL_SUMMARY_PROPERTY = 78,
  1739. ICAL_TARGET_PROPERTY = 79,
  1740. ICAL_TASKMODE_PROPERTY = 114,
  1741. ICAL_TRANSP_PROPERTY = 80,
  1742. ICAL_TRIGGER_PROPERTY = 81,
  1743. ICAL_TZID_PROPERTY = 82,
  1744. ICAL_TZIDALIASOF_PROPERTY = 108,
  1745. ICAL_TZNAME_PROPERTY = 83,
  1746. ICAL_TZOFFSETFROM_PROPERTY = 84,
  1747. ICAL_TZOFFSETTO_PROPERTY = 85,
  1748. ICAL_TZUNTIL_PROPERTY = 109,
  1749. ICAL_TZURL_PROPERTY = 86,
  1750. ICAL_UID_PROPERTY = 87,
  1751. ICAL_URL_PROPERTY = 88,
  1752. ICAL_VERSION_PROPERTY = 89,
  1753. ICAL_VOTER_PROPERTY = 107,
  1754. ICAL_X_PROPERTY = 90,
  1755. ICAL_XLICCLASS_PROPERTY = 91,
  1756. ICAL_XLICCLUSTERCOUNT_PROPERTY = 92,
  1757. ICAL_XLICERROR_PROPERTY = 93,
  1758. ICAL_XLICMIMECHARSET_PROPERTY = 94,
  1759. ICAL_XLICMIMECID_PROPERTY = 95,
  1760. ICAL_XLICMIMECONTENTTYPE_PROPERTY = 96,
  1761. ICAL_XLICMIMEENCODING_PROPERTY = 97,
  1762. ICAL_XLICMIMEFILENAME_PROPERTY = 98,
  1763. ICAL_XLICMIMEOPTINFO_PROPERTY = 99,
  1764. ICAL_NO_PROPERTY = 100
  1765. } icalproperty_kind;
  1766. /* ACCEPT-RESPONSE */
  1767. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_acceptresponse(const char* v);
  1768. LIBICAL_ICAL_EXPORT void icalproperty_set_acceptresponse(icalproperty* prop, const char* v);
  1769. LIBICAL_ICAL_EXPORT const char* icalproperty_get_acceptresponse(const icalproperty* prop);
  1770. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_acceptresponse(const char* v, ...);
  1771. /* ACKNOWLEDGED */
  1772. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_acknowledged(struct icaltimetype v);
  1773. LIBICAL_ICAL_EXPORT void icalproperty_set_acknowledged(icalproperty* prop, struct icaltimetype v);
  1774. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_acknowledged(const icalproperty* prop);
  1775. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_acknowledged(struct icaltimetype v, ...);
  1776. /* ACTION */
  1777. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_action(enum icalproperty_action v);
  1778. LIBICAL_ICAL_EXPORT void icalproperty_set_action(icalproperty* prop, enum icalproperty_action v);
  1779. LIBICAL_ICAL_EXPORT enum icalproperty_action icalproperty_get_action(const icalproperty* prop);
  1780. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_action(enum icalproperty_action v, ...);
  1781. /* ALLOW-CONFLICT */
  1782. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_allowconflict(const char* v);
  1783. LIBICAL_ICAL_EXPORT void icalproperty_set_allowconflict(icalproperty* prop, const char* v);
  1784. LIBICAL_ICAL_EXPORT const char* icalproperty_get_allowconflict(const icalproperty* prop);
  1785. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_allowconflict(const char* v, ...);
  1786. /* ATTACH */
  1787. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_attach(icalattach * v);
  1788. LIBICAL_ICAL_EXPORT void icalproperty_set_attach(icalproperty* prop, icalattach * v);
  1789. LIBICAL_ICAL_EXPORT icalattach * icalproperty_get_attach(const icalproperty* prop);
  1790. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_attach(icalattach * v, ...);
  1791. /* ATTENDEE */
  1792. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_attendee(const char* v);
  1793. LIBICAL_ICAL_EXPORT void icalproperty_set_attendee(icalproperty* prop, const char* v);
  1794. LIBICAL_ICAL_EXPORT const char* icalproperty_get_attendee(const icalproperty* prop);
  1795. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_attendee(const char* v, ...);
  1796. /* BUSYTYPE */
  1797. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_busytype(enum icalproperty_busytype v);
  1798. LIBICAL_ICAL_EXPORT void icalproperty_set_busytype(icalproperty* prop, enum icalproperty_busytype v);
  1799. LIBICAL_ICAL_EXPORT enum icalproperty_busytype icalproperty_get_busytype(const icalproperty* prop);
  1800. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_busytype(enum icalproperty_busytype v, ...);
  1801. /* CALID */
  1802. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_calid(const char* v);
  1803. LIBICAL_ICAL_EXPORT void icalproperty_set_calid(icalproperty* prop, const char* v);
  1804. LIBICAL_ICAL_EXPORT const char* icalproperty_get_calid(const icalproperty* prop);
  1805. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_calid(const char* v, ...);
  1806. /* CALMASTER */
  1807. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_calmaster(const char* v);
  1808. LIBICAL_ICAL_EXPORT void icalproperty_set_calmaster(icalproperty* prop, const char* v);
  1809. LIBICAL_ICAL_EXPORT const char* icalproperty_get_calmaster(const icalproperty* prop);
  1810. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_calmaster(const char* v, ...);
  1811. /* CALSCALE */
  1812. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_calscale(const char* v);
  1813. LIBICAL_ICAL_EXPORT void icalproperty_set_calscale(icalproperty* prop, const char* v);
  1814. LIBICAL_ICAL_EXPORT const char* icalproperty_get_calscale(const icalproperty* prop);
  1815. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_calscale(const char* v, ...);
  1816. /* CAP-VERSION */
  1817. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_capversion(const char* v);
  1818. LIBICAL_ICAL_EXPORT void icalproperty_set_capversion(icalproperty* prop, const char* v);
  1819. LIBICAL_ICAL_EXPORT const char* icalproperty_get_capversion(const icalproperty* prop);
  1820. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_capversion(const char* v, ...);
  1821. /* CAR-LEVEL */
  1822. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_carlevel(enum icalproperty_carlevel v);
  1823. LIBICAL_ICAL_EXPORT void icalproperty_set_carlevel(icalproperty* prop, enum icalproperty_carlevel v);
  1824. LIBICAL_ICAL_EXPORT enum icalproperty_carlevel icalproperty_get_carlevel(const icalproperty* prop);
  1825. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_carlevel(enum icalproperty_carlevel v, ...);
  1826. /* CARID */
  1827. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_carid(const char* v);
  1828. LIBICAL_ICAL_EXPORT void icalproperty_set_carid(icalproperty* prop, const char* v);
  1829. LIBICAL_ICAL_EXPORT const char* icalproperty_get_carid(const icalproperty* prop);
  1830. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_carid(const char* v, ...);
  1831. /* CATEGORIES */
  1832. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_categories(const char* v);
  1833. LIBICAL_ICAL_EXPORT void icalproperty_set_categories(icalproperty* prop, const char* v);
  1834. LIBICAL_ICAL_EXPORT const char* icalproperty_get_categories(const icalproperty* prop);
  1835. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_categories(const char* v, ...);
  1836. /* CLASS */
  1837. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_class(enum icalproperty_class v);
  1838. LIBICAL_ICAL_EXPORT void icalproperty_set_class(icalproperty* prop, enum icalproperty_class v);
  1839. LIBICAL_ICAL_EXPORT enum icalproperty_class icalproperty_get_class(const icalproperty* prop);
  1840. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_class(enum icalproperty_class v, ...);
  1841. /* CMD */
  1842. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_cmd(enum icalproperty_cmd v);
  1843. LIBICAL_ICAL_EXPORT void icalproperty_set_cmd(icalproperty* prop, enum icalproperty_cmd v);
  1844. LIBICAL_ICAL_EXPORT enum icalproperty_cmd icalproperty_get_cmd(const icalproperty* prop);
  1845. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_cmd(enum icalproperty_cmd v, ...);
  1846. /* COMMENT */
  1847. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_comment(const char* v);
  1848. LIBICAL_ICAL_EXPORT void icalproperty_set_comment(icalproperty* prop, const char* v);
  1849. LIBICAL_ICAL_EXPORT const char* icalproperty_get_comment(const icalproperty* prop);
  1850. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_comment(const char* v, ...);
  1851. /* COMPLETED */
  1852. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_completed(struct icaltimetype v);
  1853. LIBICAL_ICAL_EXPORT void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v);
  1854. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_completed(const icalproperty* prop);
  1855. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...);
  1856. /* COMPONENTS */
  1857. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_components(const char* v);
  1858. LIBICAL_ICAL_EXPORT void icalproperty_set_components(icalproperty* prop, const char* v);
  1859. LIBICAL_ICAL_EXPORT const char* icalproperty_get_components(const icalproperty* prop);
  1860. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_components(const char* v, ...);
  1861. /* CONTACT */
  1862. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_contact(const char* v);
  1863. LIBICAL_ICAL_EXPORT void icalproperty_set_contact(icalproperty* prop, const char* v);
  1864. LIBICAL_ICAL_EXPORT const char* icalproperty_get_contact(const icalproperty* prop);
  1865. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_contact(const char* v, ...);
  1866. /* CREATED */
  1867. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_created(struct icaltimetype v);
  1868. LIBICAL_ICAL_EXPORT void icalproperty_set_created(icalproperty* prop, struct icaltimetype v);
  1869. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_created(const icalproperty* prop);
  1870. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...);
  1871. /* CSID */
  1872. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_csid(const char* v);
  1873. LIBICAL_ICAL_EXPORT void icalproperty_set_csid(icalproperty* prop, const char* v);
  1874. LIBICAL_ICAL_EXPORT const char* icalproperty_get_csid(const icalproperty* prop);
  1875. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_csid(const char* v, ...);
  1876. /* DATE-MAX */
  1877. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_datemax(struct icaltimetype v);
  1878. LIBICAL_ICAL_EXPORT void icalproperty_set_datemax(icalproperty* prop, struct icaltimetype v);
  1879. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_datemax(const icalproperty* prop);
  1880. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_datemax(struct icaltimetype v, ...);
  1881. /* DATE-MIN */
  1882. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_datemin(struct icaltimetype v);
  1883. LIBICAL_ICAL_EXPORT void icalproperty_set_datemin(icalproperty* prop, struct icaltimetype v);
  1884. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_datemin(const icalproperty* prop);
  1885. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_datemin(struct icaltimetype v, ...);
  1886. /* DECREED */
  1887. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_decreed(const char* v);
  1888. LIBICAL_ICAL_EXPORT void icalproperty_set_decreed(icalproperty* prop, const char* v);
  1889. LIBICAL_ICAL_EXPORT const char* icalproperty_get_decreed(const icalproperty* prop);
  1890. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_decreed(const char* v, ...);
  1891. /* DEFAULT-CHARSET */
  1892. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_defaultcharset(const char* v);
  1893. LIBICAL_ICAL_EXPORT void icalproperty_set_defaultcharset(icalproperty* prop, const char* v);
  1894. LIBICAL_ICAL_EXPORT const char* icalproperty_get_defaultcharset(const icalproperty* prop);
  1895. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_defaultcharset(const char* v, ...);
  1896. /* DEFAULT-LOCALE */
  1897. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_defaultlocale(const char* v);
  1898. LIBICAL_ICAL_EXPORT void icalproperty_set_defaultlocale(icalproperty* prop, const char* v);
  1899. LIBICAL_ICAL_EXPORT const char* icalproperty_get_defaultlocale(const icalproperty* prop);
  1900. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_defaultlocale(const char* v, ...);
  1901. /* DEFAULT-TZID */
  1902. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_defaulttzid(const char* v);
  1903. LIBICAL_ICAL_EXPORT void icalproperty_set_defaulttzid(icalproperty* prop, const char* v);
  1904. LIBICAL_ICAL_EXPORT const char* icalproperty_get_defaulttzid(const icalproperty* prop);
  1905. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_defaulttzid(const char* v, ...);
  1906. /* DEFAULT-VCARS */
  1907. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_defaultvcars(const char* v);
  1908. LIBICAL_ICAL_EXPORT void icalproperty_set_defaultvcars(icalproperty* prop, const char* v);
  1909. LIBICAL_ICAL_EXPORT const char* icalproperty_get_defaultvcars(const icalproperty* prop);
  1910. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_defaultvcars(const char* v, ...);
  1911. /* DENY */
  1912. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_deny(const char* v);
  1913. LIBICAL_ICAL_EXPORT void icalproperty_set_deny(icalproperty* prop, const char* v);
  1914. LIBICAL_ICAL_EXPORT const char* icalproperty_get_deny(const icalproperty* prop);
  1915. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_deny(const char* v, ...);
  1916. /* DESCRIPTION */
  1917. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_description(const char* v);
  1918. LIBICAL_ICAL_EXPORT void icalproperty_set_description(icalproperty* prop, const char* v);
  1919. LIBICAL_ICAL_EXPORT const char* icalproperty_get_description(const icalproperty* prop);
  1920. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_description(const char* v, ...);
  1921. /* DTEND */
  1922. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_dtend(struct icaltimetype v);
  1923. LIBICAL_ICAL_EXPORT void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v);
  1924. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_dtend(const icalproperty* prop);
  1925. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...);
  1926. /* DTSTAMP */
  1927. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_dtstamp(struct icaltimetype v);
  1928. LIBICAL_ICAL_EXPORT void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v);
  1929. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_dtstamp(const icalproperty* prop);
  1930. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...);
  1931. /* DTSTART */
  1932. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_dtstart(struct icaltimetype v);
  1933. LIBICAL_ICAL_EXPORT void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v);
  1934. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_dtstart(const icalproperty* prop);
  1935. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...);
  1936. /* DUE */
  1937. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_due(struct icaltimetype v);
  1938. LIBICAL_ICAL_EXPORT void icalproperty_set_due(icalproperty* prop, struct icaltimetype v);
  1939. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_due(const icalproperty* prop);
  1940. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...);
  1941. /* DURATION */
  1942. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_duration(struct icaldurationtype v);
  1943. LIBICAL_ICAL_EXPORT void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v);
  1944. LIBICAL_ICAL_EXPORT struct icaldurationtype icalproperty_get_duration(const icalproperty* prop);
  1945. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...);
  1946. /* ESTIMATED-DURATION */
  1947. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_estimatedduration(struct icaldurationtype v);
  1948. LIBICAL_ICAL_EXPORT void icalproperty_set_estimatedduration(icalproperty* prop, struct icaldurationtype v);
  1949. LIBICAL_ICAL_EXPORT struct icaldurationtype icalproperty_get_estimatedduration(const icalproperty* prop);
  1950. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_estimatedduration(struct icaldurationtype v, ...);
  1951. /* EXDATE */
  1952. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_exdate(struct icaltimetype v);
  1953. LIBICAL_ICAL_EXPORT void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v);
  1954. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_exdate(const icalproperty* prop);
  1955. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...);
  1956. /* EXPAND */
  1957. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_expand(int v);
  1958. LIBICAL_ICAL_EXPORT void icalproperty_set_expand(icalproperty* prop, int v);
  1959. LIBICAL_ICAL_EXPORT int icalproperty_get_expand(const icalproperty* prop);
  1960. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_expand(int v, ...);
  1961. /* EXRULE */
  1962. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v);
  1963. LIBICAL_ICAL_EXPORT void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v);
  1964. LIBICAL_ICAL_EXPORT struct icalrecurrencetype icalproperty_get_exrule(const icalproperty* prop);
  1965. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...);
  1966. /* FREEBUSY */
  1967. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_freebusy(struct icalperiodtype v);
  1968. LIBICAL_ICAL_EXPORT void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v);
  1969. LIBICAL_ICAL_EXPORT struct icalperiodtype icalproperty_get_freebusy(const icalproperty* prop);
  1970. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...);
  1971. /* GEO */
  1972. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_geo(struct icalgeotype v);
  1973. LIBICAL_ICAL_EXPORT void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v);
  1974. LIBICAL_ICAL_EXPORT struct icalgeotype icalproperty_get_geo(const icalproperty* prop);
  1975. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...);
  1976. /* GRANT */
  1977. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_grant(const char* v);
  1978. LIBICAL_ICAL_EXPORT void icalproperty_set_grant(icalproperty* prop, const char* v);
  1979. LIBICAL_ICAL_EXPORT const char* icalproperty_get_grant(const icalproperty* prop);
  1980. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_grant(const char* v, ...);
  1981. /* ITIP-VERSION */
  1982. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_itipversion(const char* v);
  1983. LIBICAL_ICAL_EXPORT void icalproperty_set_itipversion(icalproperty* prop, const char* v);
  1984. LIBICAL_ICAL_EXPORT const char* icalproperty_get_itipversion(const icalproperty* prop);
  1985. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_itipversion(const char* v, ...);
  1986. /* LAST-MODIFIED */
  1987. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_lastmodified(struct icaltimetype v);
  1988. LIBICAL_ICAL_EXPORT void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v);
  1989. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_lastmodified(const icalproperty* prop);
  1990. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...);
  1991. /* LOCATION */
  1992. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_location(const char* v);
  1993. LIBICAL_ICAL_EXPORT void icalproperty_set_location(icalproperty* prop, const char* v);
  1994. LIBICAL_ICAL_EXPORT const char* icalproperty_get_location(const icalproperty* prop);
  1995. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_location(const char* v, ...);
  1996. /* MAX-COMPONENT-SIZE */
  1997. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_maxcomponentsize(int v);
  1998. LIBICAL_ICAL_EXPORT void icalproperty_set_maxcomponentsize(icalproperty* prop, int v);
  1999. LIBICAL_ICAL_EXPORT int icalproperty_get_maxcomponentsize(const icalproperty* prop);
  2000. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_maxcomponentsize(int v, ...);
  2001. /* MAXDATE */
  2002. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_maxdate(struct icaltimetype v);
  2003. LIBICAL_ICAL_EXPORT void icalproperty_set_maxdate(icalproperty* prop, struct icaltimetype v);
  2004. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_maxdate(const icalproperty* prop);
  2005. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_maxdate(struct icaltimetype v, ...);
  2006. /* MAXRESULTS */
  2007. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_maxresults(int v);
  2008. LIBICAL_ICAL_EXPORT void icalproperty_set_maxresults(icalproperty* prop, int v);
  2009. LIBICAL_ICAL_EXPORT int icalproperty_get_maxresults(const icalproperty* prop);
  2010. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_maxresults(int v, ...);
  2011. /* MAXRESULTSSIZE */
  2012. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_maxresultssize(int v);
  2013. LIBICAL_ICAL_EXPORT void icalproperty_set_maxresultssize(icalproperty* prop, int v);
  2014. LIBICAL_ICAL_EXPORT int icalproperty_get_maxresultssize(const icalproperty* prop);
  2015. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_maxresultssize(int v, ...);
  2016. /* METHOD */
  2017. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_method(enum icalproperty_method v);
  2018. LIBICAL_ICAL_EXPORT void icalproperty_set_method(icalproperty* prop, enum icalproperty_method v);
  2019. LIBICAL_ICAL_EXPORT enum icalproperty_method icalproperty_get_method(const icalproperty* prop);
  2020. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_method(enum icalproperty_method v, ...);
  2021. /* MINDATE */
  2022. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_mindate(struct icaltimetype v);
  2023. LIBICAL_ICAL_EXPORT void icalproperty_set_mindate(icalproperty* prop, struct icaltimetype v);
  2024. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_mindate(const icalproperty* prop);
  2025. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_mindate(struct icaltimetype v, ...);
  2026. /* MULTIPART */
  2027. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_multipart(const char* v);
  2028. LIBICAL_ICAL_EXPORT void icalproperty_set_multipart(icalproperty* prop, const char* v);
  2029. LIBICAL_ICAL_EXPORT const char* icalproperty_get_multipart(const icalproperty* prop);
  2030. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_multipart(const char* v, ...);
  2031. /* NAME */
  2032. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_name(const char* v);
  2033. LIBICAL_ICAL_EXPORT void icalproperty_set_name(icalproperty* prop, const char* v);
  2034. LIBICAL_ICAL_EXPORT const char* icalproperty_get_name(const icalproperty* prop);
  2035. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_name(const char* v, ...);
  2036. /* ORGANIZER */
  2037. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_organizer(const char* v);
  2038. LIBICAL_ICAL_EXPORT void icalproperty_set_organizer(icalproperty* prop, const char* v);
  2039. LIBICAL_ICAL_EXPORT const char* icalproperty_get_organizer(const icalproperty* prop);
  2040. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_organizer(const char* v, ...);
  2041. /* OWNER */
  2042. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_owner(const char* v);
  2043. LIBICAL_ICAL_EXPORT void icalproperty_set_owner(icalproperty* prop, const char* v);
  2044. LIBICAL_ICAL_EXPORT const char* icalproperty_get_owner(const icalproperty* prop);
  2045. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_owner(const char* v, ...);
  2046. /* PERCENT-COMPLETE */
  2047. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_percentcomplete(int v);
  2048. LIBICAL_ICAL_EXPORT void icalproperty_set_percentcomplete(icalproperty* prop, int v);
  2049. LIBICAL_ICAL_EXPORT int icalproperty_get_percentcomplete(const icalproperty* prop);
  2050. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_percentcomplete(int v, ...);
  2051. /* PERMISSION */
  2052. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_permission(const char* v);
  2053. LIBICAL_ICAL_EXPORT void icalproperty_set_permission(icalproperty* prop, const char* v);
  2054. LIBICAL_ICAL_EXPORT const char* icalproperty_get_permission(const icalproperty* prop);
  2055. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_permission(const char* v, ...);
  2056. /* POLL-COMPLETION */
  2057. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_pollcompletion(enum icalproperty_pollcompletion v);
  2058. LIBICAL_ICAL_EXPORT void icalproperty_set_pollcompletion(icalproperty* prop, enum icalproperty_pollcompletion v);
  2059. LIBICAL_ICAL_EXPORT enum icalproperty_pollcompletion icalproperty_get_pollcompletion(const icalproperty* prop);
  2060. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_pollcompletion(enum icalproperty_pollcompletion v, ...);
  2061. /* POLL-ITEM-ID */
  2062. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_pollitemid(int v);
  2063. LIBICAL_ICAL_EXPORT void icalproperty_set_pollitemid(icalproperty* prop, int v);
  2064. LIBICAL_ICAL_EXPORT int icalproperty_get_pollitemid(const icalproperty* prop);
  2065. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_pollitemid(int v, ...);
  2066. /* POLL-MODE */
  2067. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_pollmode(enum icalproperty_pollmode v);
  2068. LIBICAL_ICAL_EXPORT void icalproperty_set_pollmode(icalproperty* prop, enum icalproperty_pollmode v);
  2069. LIBICAL_ICAL_EXPORT enum icalproperty_pollmode icalproperty_get_pollmode(const icalproperty* prop);
  2070. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_pollmode(enum icalproperty_pollmode v, ...);
  2071. /* POLL-PROPERTIES */
  2072. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_pollproperties(const char* v);
  2073. LIBICAL_ICAL_EXPORT void icalproperty_set_pollproperties(icalproperty* prop, const char* v);
  2074. LIBICAL_ICAL_EXPORT const char* icalproperty_get_pollproperties(const icalproperty* prop);
  2075. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_pollproperties(const char* v, ...);
  2076. /* POLL-WINNER */
  2077. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_pollwinner(int v);
  2078. LIBICAL_ICAL_EXPORT void icalproperty_set_pollwinner(icalproperty* prop, int v);
  2079. LIBICAL_ICAL_EXPORT int icalproperty_get_pollwinner(const icalproperty* prop);
  2080. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_pollwinner(int v, ...);
  2081. /* PRIORITY */
  2082. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_priority(int v);
  2083. LIBICAL_ICAL_EXPORT void icalproperty_set_priority(icalproperty* prop, int v);
  2084. LIBICAL_ICAL_EXPORT int icalproperty_get_priority(const icalproperty* prop);
  2085. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_priority(int v, ...);
  2086. /* PRODID */
  2087. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_prodid(const char* v);
  2088. LIBICAL_ICAL_EXPORT void icalproperty_set_prodid(icalproperty* prop, const char* v);
  2089. LIBICAL_ICAL_EXPORT const char* icalproperty_get_prodid(const icalproperty* prop);
  2090. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_prodid(const char* v, ...);
  2091. /* QUERY */
  2092. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_query(const char* v);
  2093. LIBICAL_ICAL_EXPORT void icalproperty_set_query(icalproperty* prop, const char* v);
  2094. LIBICAL_ICAL_EXPORT const char* icalproperty_get_query(const icalproperty* prop);
  2095. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_query(const char* v, ...);
  2096. /* QUERY-LEVEL */
  2097. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_querylevel(enum icalproperty_querylevel v);
  2098. LIBICAL_ICAL_EXPORT void icalproperty_set_querylevel(icalproperty* prop, enum icalproperty_querylevel v);
  2099. LIBICAL_ICAL_EXPORT enum icalproperty_querylevel icalproperty_get_querylevel(const icalproperty* prop);
  2100. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_querylevel(enum icalproperty_querylevel v, ...);
  2101. /* QUERYID */
  2102. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_queryid(const char* v);
  2103. LIBICAL_ICAL_EXPORT void icalproperty_set_queryid(icalproperty* prop, const char* v);
  2104. LIBICAL_ICAL_EXPORT const char* icalproperty_get_queryid(const icalproperty* prop);
  2105. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_queryid(const char* v, ...);
  2106. /* QUERYNAME */
  2107. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_queryname(const char* v);
  2108. LIBICAL_ICAL_EXPORT void icalproperty_set_queryname(icalproperty* prop, const char* v);
  2109. LIBICAL_ICAL_EXPORT const char* icalproperty_get_queryname(const icalproperty* prop);
  2110. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_queryname(const char* v, ...);
  2111. /* RDATE */
  2112. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_rdate(struct icaldatetimeperiodtype v);
  2113. LIBICAL_ICAL_EXPORT void icalproperty_set_rdate(icalproperty* prop, struct icaldatetimeperiodtype v);
  2114. LIBICAL_ICAL_EXPORT struct icaldatetimeperiodtype icalproperty_get_rdate(const icalproperty* prop);
  2115. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_rdate(struct icaldatetimeperiodtype v, ...);
  2116. /* RECUR-ACCEPTED */
  2117. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_recuraccepted(const char* v);
  2118. LIBICAL_ICAL_EXPORT void icalproperty_set_recuraccepted(icalproperty* prop, const char* v);
  2119. LIBICAL_ICAL_EXPORT const char* icalproperty_get_recuraccepted(const icalproperty* prop);
  2120. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_recuraccepted(const char* v, ...);
  2121. /* RECUR-EXPAND */
  2122. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_recurexpand(const char* v);
  2123. LIBICAL_ICAL_EXPORT void icalproperty_set_recurexpand(icalproperty* prop, const char* v);
  2124. LIBICAL_ICAL_EXPORT const char* icalproperty_get_recurexpand(const icalproperty* prop);
  2125. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_recurexpand(const char* v, ...);
  2126. /* RECUR-LIMIT */
  2127. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_recurlimit(const char* v);
  2128. LIBICAL_ICAL_EXPORT void icalproperty_set_recurlimit(icalproperty* prop, const char* v);
  2129. LIBICAL_ICAL_EXPORT const char* icalproperty_get_recurlimit(const icalproperty* prop);
  2130. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_recurlimit(const char* v, ...);
  2131. /* RECURRENCE-ID */
  2132. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v);
  2133. LIBICAL_ICAL_EXPORT void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v);
  2134. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_recurrenceid(const icalproperty* prop);
  2135. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...);
  2136. /* RELATED-TO */
  2137. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_relatedto(const char* v);
  2138. LIBICAL_ICAL_EXPORT void icalproperty_set_relatedto(icalproperty* prop, const char* v);
  2139. LIBICAL_ICAL_EXPORT const char* icalproperty_get_relatedto(const icalproperty* prop);
  2140. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_relatedto(const char* v, ...);
  2141. /* RELCALID */
  2142. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_relcalid(const char* v);
  2143. LIBICAL_ICAL_EXPORT void icalproperty_set_relcalid(icalproperty* prop, const char* v);
  2144. LIBICAL_ICAL_EXPORT const char* icalproperty_get_relcalid(const icalproperty* prop);
  2145. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_relcalid(const char* v, ...);
  2146. /* REPEAT */
  2147. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_repeat(int v);
  2148. LIBICAL_ICAL_EXPORT void icalproperty_set_repeat(icalproperty* prop, int v);
  2149. LIBICAL_ICAL_EXPORT int icalproperty_get_repeat(const icalproperty* prop);
  2150. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_repeat(int v, ...);
  2151. /* REPLY-URL */
  2152. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_replyurl(const char* v);
  2153. LIBICAL_ICAL_EXPORT void icalproperty_set_replyurl(icalproperty* prop, const char* v);
  2154. LIBICAL_ICAL_EXPORT const char* icalproperty_get_replyurl(const icalproperty* prop);
  2155. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_replyurl(const char* v, ...);
  2156. /* REQUEST-STATUS */
  2157. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_requeststatus(struct icalreqstattype v);
  2158. LIBICAL_ICAL_EXPORT void icalproperty_set_requeststatus(icalproperty* prop, struct icalreqstattype v);
  2159. LIBICAL_ICAL_EXPORT struct icalreqstattype icalproperty_get_requeststatus(const icalproperty* prop);
  2160. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_requeststatus(struct icalreqstattype v, ...);
  2161. /* RESOURCES */
  2162. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_resources(const char* v);
  2163. LIBICAL_ICAL_EXPORT void icalproperty_set_resources(icalproperty* prop, const char* v);
  2164. LIBICAL_ICAL_EXPORT const char* icalproperty_get_resources(const icalproperty* prop);
  2165. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_resources(const char* v, ...);
  2166. /* RESPONSE */
  2167. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_response(int v);
  2168. LIBICAL_ICAL_EXPORT void icalproperty_set_response(icalproperty* prop, int v);
  2169. LIBICAL_ICAL_EXPORT int icalproperty_get_response(const icalproperty* prop);
  2170. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_response(int v, ...);
  2171. /* RESTRICTION */
  2172. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_restriction(const char* v);
  2173. LIBICAL_ICAL_EXPORT void icalproperty_set_restriction(icalproperty* prop, const char* v);
  2174. LIBICAL_ICAL_EXPORT const char* icalproperty_get_restriction(const icalproperty* prop);
  2175. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_restriction(const char* v, ...);
  2176. /* RRULE */
  2177. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v);
  2178. LIBICAL_ICAL_EXPORT void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v);
  2179. LIBICAL_ICAL_EXPORT struct icalrecurrencetype icalproperty_get_rrule(const icalproperty* prop);
  2180. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...);
  2181. /* SCOPE */
  2182. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_scope(const char* v);
  2183. LIBICAL_ICAL_EXPORT void icalproperty_set_scope(icalproperty* prop, const char* v);
  2184. LIBICAL_ICAL_EXPORT const char* icalproperty_get_scope(const icalproperty* prop);
  2185. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_scope(const char* v, ...);
  2186. /* SEQUENCE */
  2187. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_sequence(int v);
  2188. LIBICAL_ICAL_EXPORT void icalproperty_set_sequence(icalproperty* prop, int v);
  2189. LIBICAL_ICAL_EXPORT int icalproperty_get_sequence(const icalproperty* prop);
  2190. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_sequence(int v, ...);
  2191. /* STATUS */
  2192. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_status(enum icalproperty_status v);
  2193. LIBICAL_ICAL_EXPORT void icalproperty_set_status(icalproperty* prop, enum icalproperty_status v);
  2194. LIBICAL_ICAL_EXPORT enum icalproperty_status icalproperty_get_status(const icalproperty* prop);
  2195. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_status(enum icalproperty_status v, ...);
  2196. /* STORES-EXPANDED */
  2197. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_storesexpanded(const char* v);
  2198. LIBICAL_ICAL_EXPORT void icalproperty_set_storesexpanded(icalproperty* prop, const char* v);
  2199. LIBICAL_ICAL_EXPORT const char* icalproperty_get_storesexpanded(const icalproperty* prop);
  2200. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_storesexpanded(const char* v, ...);
  2201. /* SUMMARY */
  2202. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_summary(const char* v);
  2203. LIBICAL_ICAL_EXPORT void icalproperty_set_summary(icalproperty* prop, const char* v);
  2204. LIBICAL_ICAL_EXPORT const char* icalproperty_get_summary(const icalproperty* prop);
  2205. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_summary(const char* v, ...);
  2206. /* TARGET */
  2207. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_target(const char* v);
  2208. LIBICAL_ICAL_EXPORT void icalproperty_set_target(icalproperty* prop, const char* v);
  2209. LIBICAL_ICAL_EXPORT const char* icalproperty_get_target(const icalproperty* prop);
  2210. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_target(const char* v, ...);
  2211. /* TASK-MODE */
  2212. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_taskmode(enum icalproperty_taskmode v);
  2213. LIBICAL_ICAL_EXPORT void icalproperty_set_taskmode(icalproperty* prop, enum icalproperty_taskmode v);
  2214. LIBICAL_ICAL_EXPORT enum icalproperty_taskmode icalproperty_get_taskmode(const icalproperty* prop);
  2215. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_taskmode(enum icalproperty_taskmode v, ...);
  2216. /* TRANSP */
  2217. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_transp(enum icalproperty_transp v);
  2218. LIBICAL_ICAL_EXPORT void icalproperty_set_transp(icalproperty* prop, enum icalproperty_transp v);
  2219. LIBICAL_ICAL_EXPORT enum icalproperty_transp icalproperty_get_transp(const icalproperty* prop);
  2220. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_transp(enum icalproperty_transp v, ...);
  2221. /* TRIGGER */
  2222. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_trigger(struct icaltriggertype v);
  2223. LIBICAL_ICAL_EXPORT void icalproperty_set_trigger(icalproperty* prop, struct icaltriggertype v);
  2224. LIBICAL_ICAL_EXPORT struct icaltriggertype icalproperty_get_trigger(const icalproperty* prop);
  2225. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_trigger(struct icaltriggertype v, ...);
  2226. /* TZID */
  2227. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_tzid(const char* v);
  2228. LIBICAL_ICAL_EXPORT void icalproperty_set_tzid(icalproperty* prop, const char* v);
  2229. LIBICAL_ICAL_EXPORT const char* icalproperty_get_tzid(const icalproperty* prop);
  2230. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_tzid(const char* v, ...);
  2231. /* TZID-ALIAS-OF */
  2232. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_tzidaliasof(const char* v);
  2233. LIBICAL_ICAL_EXPORT void icalproperty_set_tzidaliasof(icalproperty* prop, const char* v);
  2234. LIBICAL_ICAL_EXPORT const char* icalproperty_get_tzidaliasof(const icalproperty* prop);
  2235. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_tzidaliasof(const char* v, ...);
  2236. /* TZNAME */
  2237. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_tzname(const char* v);
  2238. LIBICAL_ICAL_EXPORT void icalproperty_set_tzname(icalproperty* prop, const char* v);
  2239. LIBICAL_ICAL_EXPORT const char* icalproperty_get_tzname(const icalproperty* prop);
  2240. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_tzname(const char* v, ...);
  2241. /* TZOFFSETFROM */
  2242. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_tzoffsetfrom(int v);
  2243. LIBICAL_ICAL_EXPORT void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v);
  2244. LIBICAL_ICAL_EXPORT int icalproperty_get_tzoffsetfrom(const icalproperty* prop);
  2245. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...);
  2246. /* TZOFFSETTO */
  2247. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_tzoffsetto(int v);
  2248. LIBICAL_ICAL_EXPORT void icalproperty_set_tzoffsetto(icalproperty* prop, int v);
  2249. LIBICAL_ICAL_EXPORT int icalproperty_get_tzoffsetto(const icalproperty* prop);
  2250. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_tzoffsetto(int v, ...);
  2251. /* TZUNTIL */
  2252. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_tzuntil(struct icaltimetype v);
  2253. LIBICAL_ICAL_EXPORT void icalproperty_set_tzuntil(icalproperty* prop, struct icaltimetype v);
  2254. LIBICAL_ICAL_EXPORT struct icaltimetype icalproperty_get_tzuntil(const icalproperty* prop);
  2255. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_tzuntil(struct icaltimetype v, ...);
  2256. /* TZURL */
  2257. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_tzurl(const char* v);
  2258. LIBICAL_ICAL_EXPORT void icalproperty_set_tzurl(icalproperty* prop, const char* v);
  2259. LIBICAL_ICAL_EXPORT const char* icalproperty_get_tzurl(const icalproperty* prop);
  2260. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_tzurl(const char* v, ...);
  2261. /* UID */
  2262. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_uid(const char* v);
  2263. LIBICAL_ICAL_EXPORT void icalproperty_set_uid(icalproperty* prop, const char* v);
  2264. LIBICAL_ICAL_EXPORT const char* icalproperty_get_uid(const icalproperty* prop);
  2265. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_uid(const char* v, ...);
  2266. /* URL */
  2267. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_url(const char* v);
  2268. LIBICAL_ICAL_EXPORT void icalproperty_set_url(icalproperty* prop, const char* v);
  2269. LIBICAL_ICAL_EXPORT const char* icalproperty_get_url(const icalproperty* prop);
  2270. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_url(const char* v, ...);
  2271. /* VERSION */
  2272. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_version(const char* v);
  2273. LIBICAL_ICAL_EXPORT void icalproperty_set_version(icalproperty* prop, const char* v);
  2274. LIBICAL_ICAL_EXPORT const char* icalproperty_get_version(const icalproperty* prop);
  2275. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_version(const char* v, ...);
  2276. /* VOTER */
  2277. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_voter(const char* v);
  2278. LIBICAL_ICAL_EXPORT void icalproperty_set_voter(icalproperty* prop, const char* v);
  2279. LIBICAL_ICAL_EXPORT const char* icalproperty_get_voter(const icalproperty* prop);
  2280. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_voter(const char* v, ...);
  2281. /* X */
  2282. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_x(const char* v);
  2283. LIBICAL_ICAL_EXPORT void icalproperty_set_x(icalproperty* prop, const char* v);
  2284. LIBICAL_ICAL_EXPORT const char* icalproperty_get_x(const icalproperty* prop);
  2285. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_x(const char* v, ...);
  2286. /* X-LIC-CLASS */
  2287. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_xlicclass(enum icalproperty_xlicclass v);
  2288. LIBICAL_ICAL_EXPORT void icalproperty_set_xlicclass(icalproperty* prop, enum icalproperty_xlicclass v);
  2289. LIBICAL_ICAL_EXPORT enum icalproperty_xlicclass icalproperty_get_xlicclass(const icalproperty* prop);
  2290. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_xlicclass(enum icalproperty_xlicclass v, ...);
  2291. /* X-LIC-CLUSTERCOUNT */
  2292. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_xlicclustercount(const char* v);
  2293. LIBICAL_ICAL_EXPORT void icalproperty_set_xlicclustercount(icalproperty* prop, const char* v);
  2294. LIBICAL_ICAL_EXPORT const char* icalproperty_get_xlicclustercount(const icalproperty* prop);
  2295. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...);
  2296. /* X-LIC-ERROR */
  2297. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_xlicerror(const char* v);
  2298. LIBICAL_ICAL_EXPORT void icalproperty_set_xlicerror(icalproperty* prop, const char* v);
  2299. LIBICAL_ICAL_EXPORT const char* icalproperty_get_xlicerror(const icalproperty* prop);
  2300. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_xlicerror(const char* v, ...);
  2301. /* X-LIC-MIMECHARSET */
  2302. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_xlicmimecharset(const char* v);
  2303. LIBICAL_ICAL_EXPORT void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v);
  2304. LIBICAL_ICAL_EXPORT const char* icalproperty_get_xlicmimecharset(const icalproperty* prop);
  2305. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...);
  2306. /* X-LIC-MIMECID */
  2307. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_xlicmimecid(const char* v);
  2308. LIBICAL_ICAL_EXPORT void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v);
  2309. LIBICAL_ICAL_EXPORT const char* icalproperty_get_xlicmimecid(const icalproperty* prop);
  2310. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...);
  2311. /* X-LIC-MIMECONTENTTYPE */
  2312. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_xlicmimecontenttype(const char* v);
  2313. LIBICAL_ICAL_EXPORT void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v);
  2314. LIBICAL_ICAL_EXPORT const char* icalproperty_get_xlicmimecontenttype(const icalproperty* prop);
  2315. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...);
  2316. /* X-LIC-MIMEENCODING */
  2317. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_xlicmimeencoding(const char* v);
  2318. LIBICAL_ICAL_EXPORT void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v);
  2319. LIBICAL_ICAL_EXPORT const char* icalproperty_get_xlicmimeencoding(const icalproperty* prop);
  2320. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...);
  2321. /* X-LIC-MIMEFILENAME */
  2322. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_xlicmimefilename(const char* v);
  2323. LIBICAL_ICAL_EXPORT void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v);
  2324. LIBICAL_ICAL_EXPORT const char* icalproperty_get_xlicmimefilename(const icalproperty* prop);
  2325. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...);
  2326. /* X-LIC-MIMEOPTINFO */
  2327. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v);
  2328. LIBICAL_ICAL_EXPORT void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v);
  2329. LIBICAL_ICAL_EXPORT const char* icalproperty_get_xlicmimeoptinfo(const icalproperty* prop);
  2330. LIBICAL_ICAL_EXPORT icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...);
  2331. #endif /*ICALPROPERTY_H*/
  2332. /*======================================================================
  2333. FILE: icalproperty.h
  2334. CREATOR: eric 20 March 1999
  2335. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  2336. http://www.softwarestudio.org
  2337. This program is free software; you can redistribute it and/or modify
  2338. it under the terms of either:
  2339. The LGPL as published by the Free Software Foundation, version
  2340. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  2341. Or:
  2342. The Mozilla Public License Version 1.0. You may obtain a copy of
  2343. the License at http://www.mozilla.org/MPL/
  2344. ======================================================================*/
  2345. #ifndef ICALPROPERTY_H
  2346. #define ICALPROPERTY_H
  2347. #include "libical_ical_export.h"
  2348. /* To get icalproperty_kind enumerations */
  2349. #include <stdarg.h> /* for va_... */
  2350. LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new(icalproperty_kind kind);
  2351. LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_impl(icalproperty_kind kind);
  2352. LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_clone(icalproperty *prop);
  2353. LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_from_string(const char *str);
  2354. LIBICAL_ICAL_EXPORT const char *icalproperty_as_ical_string(icalproperty *prop);
  2355. LIBICAL_ICAL_EXPORT char *icalproperty_as_ical_string_r(icalproperty *prop);
  2356. LIBICAL_ICAL_EXPORT void icalproperty_free(icalproperty *prop);
  2357. LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_isa(icalproperty *property);
  2358. LIBICAL_ICAL_EXPORT int icalproperty_isa_property(void *property);
  2359. LIBICAL_ICAL_EXPORT void icalproperty_add_parameters(struct icalproperty_impl *prop, va_list args);
  2360. LIBICAL_ICAL_EXPORT void icalproperty_add_parameter(icalproperty *prop, icalparameter *parameter);
  2361. LIBICAL_ICAL_EXPORT void icalproperty_set_parameter(icalproperty *prop, icalparameter *parameter);
  2362. LIBICAL_ICAL_EXPORT void icalproperty_set_parameter_from_string(icalproperty *prop,
  2363. const char *name,
  2364. const char *value);
  2365. LIBICAL_ICAL_EXPORT const char *icalproperty_get_parameter_as_string(icalproperty *prop,
  2366. const char *name);
  2367. LIBICAL_ICAL_EXPORT char *icalproperty_get_parameter_as_string_r(icalproperty *prop,
  2368. const char *name);
  2369. LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter(icalproperty *prop,
  2370. icalparameter_kind kind);
  2371. LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_kind(icalproperty *prop,
  2372. icalparameter_kind kind);
  2373. LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_name(icalproperty *prop,
  2374. const char *name);
  2375. LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_ref(icalproperty *prop,
  2376. icalparameter *param);
  2377. LIBICAL_ICAL_EXPORT int icalproperty_count_parameters(const icalproperty *prop);
  2378. /* Iterate through the parameters */
  2379. LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_first_parameter(icalproperty *prop,
  2380. icalparameter_kind kind);
  2381. LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_next_parameter(icalproperty *prop,
  2382. icalparameter_kind kind);
  2383. /* Access the value of the property */
  2384. LIBICAL_ICAL_EXPORT void icalproperty_set_value(icalproperty *prop, icalvalue *value);
  2385. LIBICAL_ICAL_EXPORT void icalproperty_set_value_from_string(icalproperty *prop, const char *value,
  2386. const char *kind);
  2387. LIBICAL_ICAL_EXPORT icalvalue *icalproperty_get_value(const icalproperty *prop);
  2388. LIBICAL_ICAL_EXPORT const char *icalproperty_get_value_as_string(const icalproperty *prop);
  2389. LIBICAL_ICAL_EXPORT char *icalproperty_get_value_as_string_r(const icalproperty *prop);
  2390. LIBICAL_ICAL_EXPORT void icalvalue_set_parent(icalvalue *value, icalproperty *property);
  2391. /* Deal with X properties */
  2392. LIBICAL_ICAL_EXPORT void icalproperty_set_x_name(icalproperty *prop, const char *name);
  2393. LIBICAL_ICAL_EXPORT const char *icalproperty_get_x_name(icalproperty *prop);
  2394. /** Return the name of the property -- the type name converted to a
  2395. * string, or the value of _get_x_name if the type is and X
  2396. * property
  2397. */
  2398. LIBICAL_ICAL_EXPORT const char *icalproperty_get_property_name(const icalproperty *prop);
  2399. LIBICAL_ICAL_EXPORT char *icalproperty_get_property_name_r(const icalproperty *prop);
  2400. LIBICAL_ICAL_EXPORT icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
  2401. /* Convert kinds to string and get default value type */
  2402. LIBICAL_ICAL_EXPORT icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
  2403. LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
  2404. LIBICAL_ICAL_EXPORT const char *icalproperty_kind_to_string(icalproperty_kind kind);
  2405. LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_string_to_kind(const char *string);
  2406. /** Check validity of a specific icalproperty_kind **/
  2407. LIBICAL_ICAL_EXPORT int icalproperty_kind_is_valid(const icalproperty_kind kind);
  2408. LIBICAL_ICAL_EXPORT icalproperty_method icalproperty_string_to_method(const char *str);
  2409. LIBICAL_ICAL_EXPORT const char *icalproperty_method_to_string(icalproperty_method method);
  2410. LIBICAL_ICAL_EXPORT const char *icalproperty_enum_to_string(int e);
  2411. LIBICAL_ICAL_EXPORT char *icalproperty_enum_to_string_r(int e);
  2412. LIBICAL_ICAL_EXPORT int icalproperty_string_to_enum(const char *str);
  2413. LIBICAL_ICAL_EXPORT int icalproperty_kind_and_string_to_enum(const int kind, const char *str);
  2414. LIBICAL_ICAL_EXPORT const char *icalproperty_status_to_string(icalproperty_status);
  2415. LIBICAL_ICAL_EXPORT icalproperty_status icalproperty_string_to_status(const char *string);
  2416. LIBICAL_ICAL_EXPORT int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
  2417. #endif /*ICALPROPERTY_H */
  2418. /*======================================================================
  2419. FILE: pvl.h
  2420. CREATOR: eric November, 1995
  2421. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  2422. http://www.softwarestudio.org
  2423. This program is free software; you can redistribute it and/or modify
  2424. it under the terms of either:
  2425. The LGPL as published by the Free Software Foundation, version
  2426. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  2427. Or:
  2428. The Mozilla Public License Version 1.0. You may obtain a copy of
  2429. the License at http://www.mozilla.org/MPL/
  2430. ======================================================================*/
  2431. #ifndef ICAL_PVL_H
  2432. #define ICAL_PVL_H
  2433. #include "libical_ical_export.h"
  2434. typedef struct pvl_list_t *pvl_list;
  2435. typedef struct pvl_elem_t *pvl_elem;
  2436. /**
  2437. * This type is private. Always use pvl_elem instead. The struct would
  2438. * not even appear in this header except to make code in the USE_MACROS
  2439. * blocks work
  2440. */
  2441. typedef struct pvl_elem_t
  2442. {
  2443. int MAGIC; /**< Magic Identifier */
  2444. void *d; /**< Pointer to data user is storing */
  2445. struct pvl_elem_t *next; /**< Next element */
  2446. struct pvl_elem_t *prior; /**< Prior element */
  2447. } pvl_elem_t;
  2448. /* Create new lists or elements */
  2449. LIBICAL_ICAL_EXPORT pvl_elem pvl_new_element(void *d, pvl_elem next, pvl_elem prior);
  2450. LIBICAL_ICAL_EXPORT pvl_list pvl_newlist(void);
  2451. LIBICAL_ICAL_EXPORT void pvl_free(pvl_list);
  2452. /* Add, remove, or get the head of the list */
  2453. LIBICAL_ICAL_EXPORT void pvl_unshift(pvl_list l, void *d);
  2454. LIBICAL_ICAL_EXPORT void *pvl_shift(pvl_list l);
  2455. LIBICAL_ICAL_EXPORT pvl_elem pvl_head(pvl_list);
  2456. /* Add, remove or get the tail of the list */
  2457. LIBICAL_ICAL_EXPORT void pvl_push(pvl_list l, void *d);
  2458. LIBICAL_ICAL_EXPORT void *pvl_pop(pvl_list l);
  2459. LIBICAL_ICAL_EXPORT pvl_elem pvl_tail(pvl_list);
  2460. /* Insert elements in random places */
  2461. typedef int (*pvl_comparef) (void *a, void *b); /* a, b are of the data type */
  2462. LIBICAL_ICAL_EXPORT void pvl_insert_ordered(pvl_list l, pvl_comparef f, void *d);
  2463. LIBICAL_ICAL_EXPORT void pvl_insert_after(pvl_list l, pvl_elem e, void *d);
  2464. LIBICAL_ICAL_EXPORT void pvl_insert_before(pvl_list l, pvl_elem e, void *d);
  2465. /* Remove an element, or clear the entire list */
  2466. LIBICAL_ICAL_EXPORT void *pvl_remove(pvl_list, pvl_elem); /* Remove element, return data */
  2467. LIBICAL_ICAL_EXPORT void pvl_clear(pvl_list); /* Remove all elements, de-allocate all data */
  2468. LIBICAL_ICAL_EXPORT int pvl_count(pvl_list);
  2469. /* Navagate the list */
  2470. LIBICAL_ICAL_EXPORT pvl_elem pvl_next(pvl_elem e);
  2471. LIBICAL_ICAL_EXPORT pvl_elem pvl_prior(pvl_elem e);
  2472. /* get the data in the list */
  2473. #if !defined(PVL_USE_MACROS)
  2474. LIBICAL_ICAL_EXPORT void *pvl_data(pvl_elem);
  2475. #else
  2476. #define pvl_data(x) x==0 ? 0 : ((struct pvl_elem_t *)x)->d;
  2477. #endif
  2478. /* Find an element for which a function returns true */
  2479. typedef int (*pvl_findf) (void *a, void *b); /*a is list elem, b is other data */
  2480. LIBICAL_ICAL_EXPORT pvl_elem pvl_find(pvl_list l, pvl_findf f, void *v);
  2481. LIBICAL_ICAL_EXPORT pvl_elem pvl_find_next(pvl_list l, pvl_findf f, void *v);
  2482. /**
  2483. * Pass each element in the list to a function
  2484. * a is list elem, b is other data
  2485. */
  2486. typedef void (*pvl_applyf) (void *a, void *b);
  2487. LIBICAL_ICAL_EXPORT void pvl_apply(pvl_list l, pvl_applyf f, void *v);
  2488. #endif /* ICAL_PVL_H */
  2489. /*======================================================================
  2490. FILE: icalcomponent.h
  2491. CREATOR: eric 20 March 1999
  2492. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  2493. http://www.softwarestudio.org
  2494. This program is free software; you can redistribute it and/or modify
  2495. it under the terms of either:
  2496. The LGPL as published by the Free Software Foundation, version
  2497. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  2498. Or:
  2499. The Mozilla Public License Version 1.0. You may obtain a copy of
  2500. the License at http://www.mozilla.org/MPL/
  2501. ======================================================================*/
  2502. #ifndef ICALCOMPONENT_H
  2503. #define ICALCOMPONENT_H
  2504. #include "libical_ical_export.h"
  2505. /* defines icalcomponent_kind */
  2506. typedef struct icalcomponent_impl icalcomponent;
  2507. /* This is exposed so that callers will not have to allocate and
  2508. deallocate iterators. Pretend that you can't see it. */
  2509. typedef struct icalcompiter
  2510. {
  2511. icalcomponent_kind kind;
  2512. pvl_elem iter;
  2513. } icalcompiter;
  2514. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new(icalcomponent_kind kind);
  2515. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_clone(icalcomponent *component);
  2516. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_from_string(const char *str);
  2517. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_vanew(icalcomponent_kind kind, ...);
  2518. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_x(const char *x_name);
  2519. LIBICAL_ICAL_EXPORT void icalcomponent_free(icalcomponent *component);
  2520. LIBICAL_ICAL_EXPORT char *icalcomponent_as_ical_string(icalcomponent *component);
  2521. LIBICAL_ICAL_EXPORT char *icalcomponent_as_ical_string_r(icalcomponent *component);
  2522. LIBICAL_ICAL_EXPORT int icalcomponent_is_valid(icalcomponent *component);
  2523. LIBICAL_ICAL_EXPORT icalcomponent_kind icalcomponent_isa(const icalcomponent *component);
  2524. LIBICAL_ICAL_EXPORT int icalcomponent_isa_component(void *component);
  2525. /*
  2526. * Working with properties
  2527. */
  2528. LIBICAL_ICAL_EXPORT void icalcomponent_add_property(icalcomponent *component,
  2529. icalproperty *property);
  2530. LIBICAL_ICAL_EXPORT void icalcomponent_remove_property(icalcomponent *component,
  2531. icalproperty *property);
  2532. LIBICAL_ICAL_EXPORT int icalcomponent_count_properties(icalcomponent *component,
  2533. icalproperty_kind kind);
  2534. LIBICAL_ICAL_EXPORT icalcomponent *icalproperty_get_parent(const icalproperty *property);
  2535. /* Iterate through the properties */
  2536. LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_current_property(icalcomponent *component);
  2537. LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_first_property(icalcomponent *component,
  2538. icalproperty_kind kind);
  2539. LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_next_property(icalcomponent *component,
  2540. icalproperty_kind kind);
  2541. /*
  2542. * Working with components
  2543. */
  2544. /* Return the first VEVENT, VTODO or VJOURNAL sub-component of cop, or
  2545. comp if it is one of those types */
  2546. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_inner(icalcomponent *comp);
  2547. LIBICAL_ICAL_EXPORT void icalcomponent_add_component(icalcomponent *parent, icalcomponent *child);
  2548. LIBICAL_ICAL_EXPORT void icalcomponent_remove_component(icalcomponent *parent,
  2549. icalcomponent *child);
  2550. LIBICAL_ICAL_EXPORT int icalcomponent_count_components(icalcomponent *component,
  2551. icalcomponent_kind kind);
  2552. /**
  2553. This takes 2 VCALENDAR components and merges the second one into the first,
  2554. resolving any problems with conflicting TZIDs. comp_to_merge will no
  2555. longer exist after calling this function. */
  2556. LIBICAL_ICAL_EXPORT void icalcomponent_merge_component(icalcomponent *comp,
  2557. icalcomponent *comp_to_merge);
  2558. /* Iteration Routines. There are two forms of iterators, internal and
  2559. external. The internal ones came first, and are almost completely
  2560. sufficient, but they fail badly when you want to construct a loop that
  2561. removes components from the container.*/
  2562. /* Iterate through components */
  2563. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_current_component(icalcomponent *component);
  2564. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_first_component(icalcomponent *component,
  2565. icalcomponent_kind kind);
  2566. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_next_component(icalcomponent *component,
  2567. icalcomponent_kind kind);
  2568. /* Using external iterators */
  2569. LIBICAL_ICAL_EXPORT icalcompiter icalcomponent_begin_component(icalcomponent *component,
  2570. icalcomponent_kind kind);
  2571. LIBICAL_ICAL_EXPORT icalcompiter icalcomponent_end_component(icalcomponent *component,
  2572. icalcomponent_kind kind);
  2573. LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_next(icalcompiter * i);
  2574. LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_prior(icalcompiter * i);
  2575. LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_deref(icalcompiter * i);
  2576. /* Working with embedded error properties */
  2577. /* Check the component against itip rules and insert error properties*/
  2578. /* Working with embedded error properties */
  2579. LIBICAL_ICAL_EXPORT int icalcomponent_check_restrictions(icalcomponent *comp);
  2580. /** Count embedded errors. */
  2581. LIBICAL_ICAL_EXPORT int icalcomponent_count_errors(icalcomponent *component);
  2582. /** Remove all X-LIC-ERROR properties*/
  2583. LIBICAL_ICAL_EXPORT void icalcomponent_strip_errors(icalcomponent *component);
  2584. /** Convert some X-LIC-ERROR properties into RETURN-STATUS properties*/
  2585. LIBICAL_ICAL_EXPORT void icalcomponent_convert_errors(icalcomponent *component);
  2586. /* Internal operations. They are private, and you should not be using them. */
  2587. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_parent(icalcomponent *component);
  2588. LIBICAL_ICAL_EXPORT void icalcomponent_set_parent(icalcomponent *component,
  2589. icalcomponent *parent);
  2590. /* Kind conversion routines */
  2591. LIBICAL_ICAL_EXPORT int icalcomponent_kind_is_valid(const icalcomponent_kind kind);
  2592. LIBICAL_ICAL_EXPORT icalcomponent_kind icalcomponent_string_to_kind(const char *string);
  2593. LIBICAL_ICAL_EXPORT const char *icalcomponent_kind_to_string(icalcomponent_kind kind);
  2594. /************* Derived class methods. ****************************
  2595. If the code was in an OO language, the remaining routines would be
  2596. members of classes derived from icalcomponent. Don't call them on the
  2597. wrong component subtypes. */
  2598. /** For VCOMPONENT: Return a reference to the first VEVENT, VTODO or
  2599. VJOURNAL */
  2600. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_first_real_component(icalcomponent *c);
  2601. /** For VEVENT, VTODO, VJOURNAL and VTIMEZONE: report the start and end
  2602. times of an event in UTC */
  2603. LIBICAL_ICAL_EXPORT struct icaltime_span icalcomponent_get_span(icalcomponent *comp);
  2604. /******************** Convenience routines **********************/
  2605. LIBICAL_ICAL_EXPORT void icalcomponent_set_dtstart(icalcomponent *comp, struct icaltimetype v);
  2606. LIBICAL_ICAL_EXPORT struct icaltimetype icalcomponent_get_dtstart(icalcomponent *comp);
  2607. /* For the icalcomponent routines only, dtend and duration are tied
  2608. together. If you call the set routine for one and the other exists,
  2609. the routine will calculate the change to the other. That is, if
  2610. there is a DTEND and you call set_duration, the routine will modify
  2611. DTEND to be the sum of DTSTART and the duration. If you call a get
  2612. routine for one and the other exists, the routine will calculate
  2613. the return value. If you call a set routine and neither exists, the
  2614. routine will create the apcompriate comperty */
  2615. LIBICAL_ICAL_EXPORT struct icaltimetype icalcomponent_get_dtend(icalcomponent *comp);
  2616. LIBICAL_ICAL_EXPORT void icalcomponent_set_dtend(icalcomponent *comp, struct icaltimetype v);
  2617. LIBICAL_ICAL_EXPORT struct icaltimetype icalcomponent_get_due(icalcomponent *comp);
  2618. LIBICAL_ICAL_EXPORT void icalcomponent_set_due(icalcomponent *comp, struct icaltimetype v);
  2619. LIBICAL_ICAL_EXPORT void icalcomponent_set_duration(icalcomponent *comp,
  2620. struct icaldurationtype v);
  2621. LIBICAL_ICAL_EXPORT struct icaldurationtype icalcomponent_get_duration(icalcomponent *comp);
  2622. LIBICAL_ICAL_EXPORT void icalcomponent_set_method(icalcomponent *comp, icalproperty_method method);
  2623. LIBICAL_ICAL_EXPORT icalproperty_method icalcomponent_get_method(icalcomponent *comp);
  2624. LIBICAL_ICAL_EXPORT struct icaltimetype icalcomponent_get_dtstamp(icalcomponent *comp);
  2625. LIBICAL_ICAL_EXPORT void icalcomponent_set_dtstamp(icalcomponent *comp, struct icaltimetype v);
  2626. LIBICAL_ICAL_EXPORT void icalcomponent_set_summary(icalcomponent *comp, const char *v);
  2627. LIBICAL_ICAL_EXPORT const char *icalcomponent_get_summary(icalcomponent *comp);
  2628. LIBICAL_ICAL_EXPORT void icalcomponent_set_comment(icalcomponent *comp, const char *v);
  2629. LIBICAL_ICAL_EXPORT const char *icalcomponent_get_comment(icalcomponent *comp);
  2630. LIBICAL_ICAL_EXPORT void icalcomponent_set_uid(icalcomponent *comp, const char *v);
  2631. LIBICAL_ICAL_EXPORT const char *icalcomponent_get_uid(icalcomponent *comp);
  2632. LIBICAL_ICAL_EXPORT void icalcomponent_set_relcalid(icalcomponent *comp, const char *v);
  2633. LIBICAL_ICAL_EXPORT const char *icalcomponent_get_relcalid(icalcomponent *comp);
  2634. LIBICAL_ICAL_EXPORT void icalcomponent_set_recurrenceid(icalcomponent *comp,
  2635. struct icaltimetype v);
  2636. LIBICAL_ICAL_EXPORT struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent *comp);
  2637. LIBICAL_ICAL_EXPORT void icalcomponent_set_description(icalcomponent *comp, const char *v);
  2638. LIBICAL_ICAL_EXPORT const char *icalcomponent_get_description(icalcomponent *comp);
  2639. LIBICAL_ICAL_EXPORT void icalcomponent_set_location(icalcomponent *comp, const char *v);
  2640. LIBICAL_ICAL_EXPORT const char *icalcomponent_get_location(icalcomponent *comp);
  2641. LIBICAL_ICAL_EXPORT void icalcomponent_set_sequence(icalcomponent *comp, int v);
  2642. LIBICAL_ICAL_EXPORT int icalcomponent_get_sequence(icalcomponent *comp);
  2643. LIBICAL_ICAL_EXPORT void icalcomponent_set_status(icalcomponent *comp, enum icalproperty_status v);
  2644. LIBICAL_ICAL_EXPORT enum icalproperty_status icalcomponent_get_status(icalcomponent *comp);
  2645. /** Calls the given function for each TZID parameter found in the
  2646. component, and any subcomponents. */
  2647. LIBICAL_ICAL_EXPORT void icalcomponent_foreach_tzid(icalcomponent *comp,
  2648. void (*callback) (icalparameter *param,
  2649. void *data),
  2650. void *callback_data);
  2651. /** Returns the icaltimezone in the component corresponding to the
  2652. TZID, or NULL if it can't be found. */
  2653. LIBICAL_ICAL_EXPORT icaltimezone *icalcomponent_get_timezone(icalcomponent *comp,
  2654. const char *tzid);
  2655. LIBICAL_ICAL_EXPORT int icalproperty_recurrence_is_excluded(icalcomponent *comp,
  2656. struct icaltimetype *dtstart,
  2657. struct icaltimetype *recurtime);
  2658. LIBICAL_ICAL_EXPORT void icalcomponent_foreach_recurrence(icalcomponent *comp,
  2659. struct icaltimetype start,
  2660. struct icaltimetype end,
  2661. void (*callback) (icalcomponent *comp,
  2662. struct icaltime_span *
  2663. span, void *data),
  2664. void *callback_data);
  2665. /*************** Type Specific routines ***************/
  2666. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vcalendar(void);
  2667. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vevent(void);
  2668. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vtodo(void);
  2669. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vjournal(void);
  2670. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_valarm(void);
  2671. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vfreebusy(void);
  2672. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vtimezone(void);
  2673. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xstandard(void);
  2674. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xdaylight(void);
  2675. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vagenda(void);
  2676. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vquery(void);
  2677. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vavailability(void);
  2678. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xavailable(void);
  2679. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vpoll(void);
  2680. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vvoter(void);
  2681. LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xvote(void);
  2682. #endif /* !ICALCOMPONENT_H */
  2683. /*======================================================================
  2684. FILE: icaltimezone.h
  2685. CREATOR: Damon Chaplin 15 March 2001
  2686. (C) COPYRIGHT 2001, Damon Chaplin <damon@ximian.com>
  2687. This program is free software; you can redistribute it and/or modify
  2688. it under the terms of either:
  2689. The LGPL as published by the Free Software Foundation, version
  2690. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  2691. Or:
  2692. The Mozilla Public License Version 1.0. You may obtain a copy of
  2693. the License at http://www.mozilla.org/MPL/
  2694. ======================================================================*/
  2695. /**
  2696. * @file icaltimezone.h
  2697. * @brief timezone handling routines
  2698. */
  2699. #ifndef ICALTIMEZONE_H
  2700. #define ICALTIMEZONE_H
  2701. #include "libical_ical_export.h"
  2702. #include <stdio.h>
  2703. #if !defined(ICALTIMEZONE_DEFINED)
  2704. #define ICALTIMEZONE_DEFINED
  2705. /** @brief An opaque struct representing a timezone.
  2706. * We declare this here to avoid a circular dependancy.
  2707. */
  2708. typedef struct _icaltimezone icaltimezone;
  2709. #endif
  2710. /**
  2711. * @par Creating/Destroying individual icaltimezones.
  2712. */
  2713. /** Creates a new icaltimezone. */
  2714. LIBICAL_ICAL_EXPORT icaltimezone *icaltimezone_new(void);
  2715. LIBICAL_ICAL_EXPORT icaltimezone *icaltimezone_copy(icaltimezone *originalzone);
  2716. /** Frees all memory used for the icaltimezone. Set free_struct to free the
  2717. icaltimezone struct as well. */
  2718. LIBICAL_ICAL_EXPORT void icaltimezone_free(icaltimezone *zone, int free_struct);
  2719. /** Sets the prefix to be used for tzid's generated from system tzdata.
  2720. Must be globally unique (such as a domain name owned by the developer
  2721. of the calling application), and begin and end with forward slashes.
  2722. Do not change or de-allocate the string buffer after calling this.
  2723. */
  2724. LIBICAL_ICAL_EXPORT void icaltimezone_set_tzid_prefix(const char *new_prefix);
  2725. /**
  2726. * @par Accessing timezones.
  2727. */
  2728. /** Free any builtin timezone information **/
  2729. LIBICAL_ICAL_EXPORT void icaltimezone_free_builtin_timezones(void);
  2730. /** Returns the array of builtin icaltimezones. */
  2731. LIBICAL_ICAL_EXPORT icalarray *icaltimezone_get_builtin_timezones(void);
  2732. /** Returns a single builtin timezone, given its Olson city name. */
  2733. LIBICAL_ICAL_EXPORT icaltimezone *icaltimezone_get_builtin_timezone(const char *location);
  2734. /** Returns a single builtin timezone, given its offset. */
  2735. LIBICAL_ICAL_EXPORT icaltimezone *icaltimezone_get_builtin_timezone_from_offset(int offset,
  2736. const char *tzname);
  2737. /** Returns a single builtin timezone, given its TZID. */
  2738. LIBICAL_ICAL_EXPORT icaltimezone *icaltimezone_get_builtin_timezone_from_tzid(const char *tzid);
  2739. /** Returns the UTC timezone. */
  2740. LIBICAL_ICAL_EXPORT icaltimezone *icaltimezone_get_utc_timezone(void);
  2741. /** Returns the TZID of a timezone. */
  2742. LIBICAL_ICAL_EXPORT const char *icaltimezone_get_tzid(icaltimezone *zone);
  2743. /** Returns the city name of a timezone. */
  2744. LIBICAL_ICAL_EXPORT const char *icaltimezone_get_location(icaltimezone *zone);
  2745. /** Returns the TZNAME properties used in the latest STANDARD and DAYLIGHT
  2746. components. If they are the same it will return just one, e.g. "LMT".
  2747. If they are different it will format them like "EST/EDT". Note that this
  2748. may also return NULL. */
  2749. LIBICAL_ICAL_EXPORT const char *icaltimezone_get_tznames(icaltimezone *zone);
  2750. /** Returns the latitude of a builtin timezone. */
  2751. LIBICAL_ICAL_EXPORT double icaltimezone_get_latitude(icaltimezone *zone);
  2752. /** Returns the longitude of a builtin timezone. */
  2753. LIBICAL_ICAL_EXPORT double icaltimezone_get_longitude(icaltimezone *zone);
  2754. /** Returns the VTIMEZONE component of a timezone. */
  2755. LIBICAL_ICAL_EXPORT icalcomponent *icaltimezone_get_component(icaltimezone *zone);
  2756. /** Sets the VTIMEZONE component of an icaltimezone, initializing the tzid,
  2757. location & tzname fields. It returns 1 on success or 0 on failure, i.e.
  2758. no TZID was found. */
  2759. LIBICAL_ICAL_EXPORT int icaltimezone_set_component(icaltimezone *zone, icalcomponent *comp);
  2760. LIBICAL_ICAL_EXPORT const char *icaltimezone_get_display_name(icaltimezone *zone);
  2761. /**
  2762. * @par Converting times between timezones.
  2763. */
  2764. LIBICAL_ICAL_EXPORT void icaltimezone_convert_time(struct icaltimetype *tt,
  2765. icaltimezone *from_zone,
  2766. icaltimezone *to_zone);
  2767. /**
  2768. * @par Getting offsets from UTC.
  2769. */
  2770. /** Calculates the UTC offset of a given local time in the given
  2771. timezone. It is the number of seconds to add to UTC to get local
  2772. time. The is_daylight flag is set to 1 if the time is in
  2773. daylight-savings time. */
  2774. LIBICAL_ICAL_EXPORT int icaltimezone_get_utc_offset(icaltimezone *zone,
  2775. struct icaltimetype *tt, int *is_daylight);
  2776. /** Calculates the UTC offset of a given UTC time in the given
  2777. timezone. It is the number of seconds to add to UTC to get local
  2778. time. The is_daylight flag is set to 1 if the time is in
  2779. daylight-savings time. */
  2780. LIBICAL_ICAL_EXPORT int icaltimezone_get_utc_offset_of_utc_time(icaltimezone *zone,
  2781. struct icaltimetype *tt,
  2782. int *is_daylight);
  2783. /*
  2784. * Handling arrays of timezones. Mainly for internal use.
  2785. */
  2786. LIBICAL_ICAL_EXPORT icalarray *icaltimezone_array_new(void);
  2787. LIBICAL_ICAL_EXPORT void icaltimezone_array_append_from_vtimezone(icalarray *timezones,
  2788. icalcomponent *child);
  2789. LIBICAL_ICAL_EXPORT void icaltimezone_array_free(icalarray *timezones);
  2790. /*
  2791. * By request (issue #112) make vtimezone functions public
  2792. */
  2793. LIBICAL_ICAL_EXPORT void icaltimezone_expand_vtimezone(icalcomponent *comp,
  2794. int end_year, icalarray *changes);
  2795. LIBICAL_ICAL_EXPORT char *icaltimezone_get_location_from_vtimezone(icalcomponent *component);
  2796. LIBICAL_ICAL_EXPORT char *icaltimezone_get_tznames_from_vtimezone(icalcomponent *component);
  2797. /*
  2798. * @par Handling the default location the timezone files
  2799. */
  2800. /** Set the directory to look for the zonefiles */
  2801. LIBICAL_ICAL_EXPORT void set_zone_directory(char *path);
  2802. /** Free memory dedicated to the zonefile directory */
  2803. LIBICAL_ICAL_EXPORT void free_zone_directory(void);
  2804. LIBICAL_ICAL_EXPORT void icaltimezone_release_zone_tab(void);
  2805. /*
  2806. * @par Handling whether to use builtin timezone files
  2807. */
  2808. LIBICAL_ICAL_EXPORT void icaltimezone_set_builtin_tzdata(int set);
  2809. LIBICAL_ICAL_EXPORT int icaltimezone_get_builtin_tzdata(void);
  2810. /*
  2811. * @par Debugging Output.
  2812. */
  2813. /** Dumps information about changes in the timezone up to and including
  2814. max_year. */
  2815. LIBICAL_ICAL_EXPORT int icaltimezone_dump_changes(icaltimezone *zone, int max_year, FILE *fp);
  2816. /* For the library only -- do not make visible */
  2817. extern const char *icaltimezone_tzid_prefix(void);
  2818. #endif /* ICALTIMEZONE_H */
  2819. /*
  2820. * Authors :
  2821. * Chenthill Palanisamy <pchenthill@novell.com>
  2822. *
  2823. * Copyright 2007, Novell, Inc.
  2824. *
  2825. * This program is free software; you can redistribute it and/or
  2826. * modify it under the terms of version 2 of the GNU Lesser General Public
  2827. * License as published by the Free Software Foundation.
  2828. *
  2829. * This program is distributed in the hope that it will be useful,
  2830. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  2831. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2832. * GNU Lesser General Public License for more details.
  2833. *
  2834. * You should have received a copy of the GNU Lesser General Public
  2835. * License along with this library; if not, write to the
  2836. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  2837. * Boston, MA 02110-1301, USA.
  2838. */
  2839. #ifndef ICALTZUTIL_H
  2840. #define ICALTZUTIL_H
  2841. #include "libical_ical_export.h"
  2842. #if defined(sun) && defined(__SVR4)
  2843. #define ZONES_TAB_SYSTEM_FILENAME "tab/zone_sun.tab"
  2844. #else
  2845. #define ZONES_TAB_SYSTEM_FILENAME "zone.tab"
  2846. #endif
  2847. LIBICAL_ICAL_EXPORT const char *icaltzutil_get_zone_directory(void);
  2848. LIBICAL_ICAL_EXPORT icalcomponent *icaltzutil_fetch_timezone(const char *location);
  2849. /* set @p on to 0 if inter-operable vtimezones are desired; else exact timezones are in-effect */
  2850. LIBICAL_ICAL_EXPORT void icaltzutil_set_exact_vtimezones_support(int on);
  2851. /* return 1 if exact vtimezones are in-effect; else inter-operable vtimezones are in-effect */
  2852. LIBICAL_ICAL_EXPORT int icaltzutil_get_exact_vtimezones_support(void);
  2853. #endif
  2854. /*======================================================================
  2855. FILE: icalparser.h
  2856. CREATOR: eric 20 April 1999
  2857. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  2858. http://www.softwarestudio.org
  2859. This program is free software; you can redistribute it and/or modify
  2860. it under the terms of either:
  2861. The LGPL as published by the Free Software Foundation, version
  2862. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  2863. Or:
  2864. The Mozilla Public License Version 1.0. You may obtain a copy of
  2865. the License at http://www.mozilla.org/MPL/
  2866. The original code is icalparser.h
  2867. ======================================================================*/
  2868. #ifndef ICALPARSER_H
  2869. #define ICALPARSER_H
  2870. #include "libical_ical_export.h"
  2871. typedef struct icalparser_impl icalparser;
  2872. /**
  2873. * @file icalparser.h
  2874. * @brief Line-oriented parsing.
  2875. *
  2876. * Create a new parser via icalparse_new_parser, then add lines one at
  2877. * a time with icalparse_add_line(). icalparser_add_line() will return
  2878. * non-zero when it has finished with a component.
  2879. */
  2880. typedef enum icalparser_state
  2881. {
  2882. ICALPARSER_ERROR,
  2883. ICALPARSER_SUCCESS,
  2884. ICALPARSER_BEGIN_COMP,
  2885. ICALPARSER_END_COMP,
  2886. ICALPARSER_IN_PROGRESS
  2887. } icalparser_state;
  2888. LIBICAL_ICAL_EXPORT icalparser *icalparser_new(void);
  2889. LIBICAL_ICAL_EXPORT icalcomponent *icalparser_add_line(icalparser *parser, char *str);
  2890. LIBICAL_ICAL_EXPORT icalcomponent *icalparser_clean(icalparser *parser);
  2891. LIBICAL_ICAL_EXPORT icalparser_state icalparser_get_state(icalparser *parser);
  2892. LIBICAL_ICAL_EXPORT void icalparser_free(icalparser *parser);
  2893. /**
  2894. * Message oriented parsing. icalparser_parse takes a string that
  2895. * holds the text ( in RFC 5545 format ) and returns a pointer to an
  2896. * icalcomponent. The caller owns the memory. line_gen_func is a
  2897. * pointer to a function that returns one content line per invocation
  2898. */
  2899. LIBICAL_ICAL_EXPORT icalcomponent *icalparser_parse(icalparser *parser,
  2900. char *(*line_gen_func) (char *s,
  2901. size_t size, void *d));
  2902. /**
  2903. Set the data that icalparser_parse will give to the line_gen_func
  2904. as the parameter 'd'
  2905. */
  2906. LIBICAL_ICAL_EXPORT void icalparser_set_gen_data(icalparser *parser, void *data);
  2907. LIBICAL_ICAL_EXPORT icalcomponent *icalparser_parse_string(const char *str);
  2908. /***********************************************************************
  2909. * Parser support functions
  2910. ***********************************************************************/
  2911. /** Use the flex/bison parser to turn a string into a value type */
  2912. LIBICAL_ICAL_EXPORT icalvalue *icalparser_parse_value(icalvalue_kind kind,
  2913. const char *str, icalcomponent ** errors);
  2914. /** Given a line generator function, return a single iCal content line.*/
  2915. LIBICAL_ICAL_EXPORT char *icalparser_get_line(icalparser *parser,
  2916. char *(*line_gen_func) (char *s,
  2917. size_t size, void *d));
  2918. LIBICAL_ICAL_EXPORT char *icalparser_string_line_generator(char *out, size_t buf_size, void *d);
  2919. #endif /* !ICALPARSE_H */
  2920. /*======================================================================
  2921. FILE: icalmemory.h
  2922. CREATOR: eric 30 June 1999
  2923. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  2924. http://www.softwarestudio.org
  2925. This program is free software; you can redistribute it and/or modify
  2926. it under the terms of either:
  2927. The LGPL as published by the Free Software Foundation, version
  2928. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  2929. Or:
  2930. The Mozilla Public License Version 1.0. You may obtain a copy of
  2931. the License at http://www.mozilla.org/MPL/
  2932. The Initial Developer of the Original Code is Eric Busboom
  2933. ======================================================================*/
  2934. #ifndef ICALMEMORY_H
  2935. #define ICALMEMORY_H
  2936. /* Tmp buffers are managed by ical. References can be returned to the
  2937. caller, although the caller will not own the memory. */
  2938. #include "libical_ical_export.h"
  2939. LIBICAL_ICAL_EXPORT void *icalmemory_tmp_buffer(size_t size);
  2940. LIBICAL_ICAL_EXPORT char *icalmemory_tmp_copy(const char *str);
  2941. /** Add an externally allocated buffer to the ring. */
  2942. LIBICAL_ICAL_EXPORT void icalmemory_add_tmp_buffer(void *);
  2943. /** Free all memory used in the ring */
  2944. LIBICAL_ICAL_EXPORT void icalmemory_free_ring(void);
  2945. /* Non-tmp buffers must be freed. These are mostly wrappers around
  2946. * malloc, etc, but are used so the caller can change the memory
  2947. * allocators in a future version of the library */
  2948. LIBICAL_ICAL_EXPORT void *icalmemory_new_buffer(size_t size);
  2949. LIBICAL_ICAL_EXPORT void *icalmemory_resize_buffer(void *buf, size_t size);
  2950. LIBICAL_ICAL_EXPORT void icalmemory_free_buffer(void *buf);
  2951. /**
  2952. icalmemory_append_string will copy the string 'string' to the
  2953. buffer 'buf' starting at position 'pos', reallocing 'buf' if it is
  2954. too small. 'buf_size' is the size of 'buf' and will be changed if
  2955. 'buf' is reallocated. 'pos' will point to the last byte of the new
  2956. string in 'buf', usually a '\0' */
  2957. /* THESE ROUTINES CAN NOT BE USED ON TMP BUFFERS. Only use them on
  2958. normally allocated memory, or on buffers created from
  2959. icalmemory_new_buffer, never with buffers created by
  2960. icalmemory_tmp_buffer. If icalmemory_append_string has to resize a
  2961. buffer on the ring, the ring will loose track of it an you will
  2962. have memory problems. */
  2963. LIBICAL_ICAL_EXPORT void icalmemory_append_string(char **buf, char **pos, size_t *buf_size,
  2964. const char *string);
  2965. /** icalmemory_append_char is similar, but is appends a character instead of a string */
  2966. LIBICAL_ICAL_EXPORT void icalmemory_append_char(char **buf, char **pos, size_t *buf_size, char ch);
  2967. /** A wrapper around strdup. Partly to trap calls to strdup, partly
  2968. because in -ansi, gcc on Red Hat claims that strdup is undeclared */
  2969. LIBICAL_ICAL_EXPORT char *icalmemory_strdup(const char *s);
  2970. #endif /* !ICALMEMORY_H */
  2971. /*======================================================================
  2972. FILE: icalerror.h
  2973. CREATOR: eric 09 May 1999
  2974. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  2975. http://www.softwarestudio.org
  2976. This program is free software; you can redistribute it and/or modify
  2977. it under the terms of either:
  2978. The LGPL as published by the Free Software Foundation, version
  2979. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  2980. Or:
  2981. The Mozilla Public License Version 1.0. You may obtain a copy of
  2982. the License at http://www.mozilla.org/MPL/
  2983. The original code is icalerror.h
  2984. ======================================================================*/
  2985. #ifndef ICALERROR_H
  2986. #define ICALERROR_H
  2987. #include "libical_ical_export.h"
  2988. #include <assert.h>
  2989. #include <stdio.h>
  2990. #define ICAL_SETERROR_ISFUNC
  2991. /** This routine is called before any error is triggered. It is called by
  2992. icalerror_set_errno, so it does not appear in all of the macros below */
  2993. LIBICAL_ICAL_EXPORT void icalerror_stop_here(void);
  2994. LIBICAL_ICAL_EXPORT void icalerror_crash_here(void);
  2995. typedef enum icalerrorenum
  2996. {
  2997. ICAL_NO_ERROR = 0,
  2998. ICAL_BADARG_ERROR,
  2999. ICAL_NEWFAILED_ERROR,
  3000. ICAL_ALLOCATION_ERROR,
  3001. ICAL_MALFORMEDDATA_ERROR,
  3002. ICAL_PARSE_ERROR,
  3003. ICAL_INTERNAL_ERROR, /* Like assert --internal consist. prob */
  3004. ICAL_FILE_ERROR,
  3005. ICAL_USAGE_ERROR,
  3006. ICAL_UNIMPLEMENTED_ERROR,
  3007. ICAL_UNKNOWN_ERROR /* Used for problems in input to icalerror_strerror() */
  3008. } icalerrorenum;
  3009. LIBICAL_ICAL_EXPORT icalerrorenum *icalerrno_return(void);
  3010. #define icalerrno (*(icalerrno_return()))
  3011. /** If true, libicu aborts after a call to icalerror_set_error
  3012. *
  3013. * @warning NOT THREAD SAFE -- recommended that you do not change
  3014. * this in a multithreaded program.
  3015. */
  3016. LIBICAL_ICAL_EXPORT void icalerror_set_errors_are_fatal(int fatal);
  3017. LIBICAL_ICAL_EXPORT int icalerror_get_errors_are_fatal(void);
  3018. /* Warning messages */
  3019. #ifdef __GNUC__ca
  3020. #define icalerror_warn(message) ;{fprintf(stderr, "%s(), %s:%d: %s\n", __FUNCTION__, __FILE__, __LINE__, message);}
  3021. #else /* __GNU_C__ */
  3022. #define icalerror_warn(message) ;{fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, message);}
  3023. #endif /* __GNU_C__ */
  3024. LIBICAL_ICAL_EXPORT void icalerror_clear_errno(void);
  3025. LIBICAL_ICAL_EXPORT void _icalerror_set_errno(icalerrorenum);
  3026. /* Make an individual error fatal or non-fatal. */
  3027. typedef enum icalerrorstate
  3028. {
  3029. ICAL_ERROR_FATAL, /* Not fatal */
  3030. ICAL_ERROR_NONFATAL, /* Fatal */
  3031. ICAL_ERROR_DEFAULT, /* Use the value of icalerror_errors_are_fatal */
  3032. ICAL_ERROR_UNKNOWN /* Asked state for an unknown error type */
  3033. } icalerrorstate;
  3034. LIBICAL_ICAL_EXPORT const char *icalerror_strerror(icalerrorenum e);
  3035. LIBICAL_ICAL_EXPORT const char *icalerror_perror(void);
  3036. LIBICAL_ICAL_EXPORT void ical_bt(void);
  3037. LIBICAL_ICAL_EXPORT void icalerror_set_error_state(icalerrorenum error, icalerrorstate);
  3038. LIBICAL_ICAL_EXPORT icalerrorstate icalerror_get_error_state(icalerrorenum error);
  3039. LIBICAL_ICAL_EXPORT icalerrorenum icalerror_error_from_string(const char *str);
  3040. #if !defined(ICAL_SETERROR_ISFUNC)
  3041. #define icalerror_set_errno(x) ;icalerrno = x; ;if(icalerror_get_error_state(x) == ICAL_ERROR_FATAL || ; (icalerror_get_error_state(x) == ICAL_ERROR_DEFAULT && ; icalerror_get_errors_are_fatal() == 1)){ ; icalerror_warn(icalerror_strerror(x)); ; ical_bt(); ; assert(0); ;} }
  3042. #else
  3043. LIBICAL_ICAL_EXPORT void icalerror_set_errno(icalerrorenum x);
  3044. #endif
  3045. #if !defined(ICAL_ERRORS_ARE_FATAL)
  3046. #define ICAL_ERRORS_ARE_FATAL 0
  3047. #endif
  3048. #if ICAL_ERRORS_ARE_FATAL == 1
  3049. #undef NDEBUG
  3050. #endif
  3051. #define icalerror_check_value_type(value,type);
  3052. #define icalerror_check_property_type(value,type);
  3053. #define icalerror_check_parameter_type(value,type);
  3054. #define icalerror_check_component_type(value,type);
  3055. /* Assert with a message */
  3056. #if ICAL_ERRORS_ARE_FATAL == 1
  3057. #ifdef __GNUC__
  3058. #define icalerror_assert(test,message) ;if (!(test)) { ; fprintf(stderr, "%s(), %s:%d: %s\n", __FUNCTION__, __FILE__, __LINE__, message); ; icalerror_stop_here(); ; abort();}
  3059. #else /*__GNUC__*/
  3060. #define icalerror_assert(test,message) ;if (!(test)) { ; fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, message); ; icalerror_stop_here(); ; abort();}
  3061. #endif /*__GNUC__*/
  3062. #else /* ICAL_ERRORS_ARE_FATAL */
  3063. #define icalerror_assert(test,message)
  3064. #endif /* ICAL_ERRORS_ARE_FATAL */
  3065. /* Check & abort if check fails */
  3066. #define icalerror_check_arg(test,arg) ;if (!(test)) { ; icalerror_set_errno(ICAL_BADARG_ERROR); ;}
  3067. /* Check & return void if check fails*/
  3068. #define icalerror_check_arg_rv(test,arg) ;if (!(test)) { ; icalerror_set_errno(ICAL_BADARG_ERROR); ; return; ;}
  3069. /* Check & return 0 if check fails*/
  3070. #define icalerror_check_arg_rz(test,arg) ;if (!(test)) { ; icalerror_set_errno(ICAL_BADARG_ERROR); ; return 0; ;}
  3071. /* Check & return an error if check fails*/
  3072. #define icalerror_check_arg_re(test,arg,error) ;if (!(test)) { ; icalerror_stop_here(); ; assert(0); ; return error; ;}
  3073. /* Check & return something*/
  3074. #define icalerror_check_arg_rx(test,arg,x) ;if (!(test)) { ; icalerror_set_errno(ICAL_BADARG_ERROR); ; return x; ;}
  3075. /* String interfaces to set an error to NONFATAL and restore it to its original value */
  3076. LIBICAL_ICAL_EXPORT icalerrorstate icalerror_supress(const char *error);
  3077. LIBICAL_ICAL_EXPORT void icalerror_restore(const char *error, icalerrorstate es);
  3078. #endif /* !ICALERROR_H */
  3079. /*======================================================================
  3080. FILE: icalrestriction.h
  3081. CREATOR: eric 24 April 1999
  3082. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  3083. http://www.softwarestudio.org
  3084. This program is free software; you can redistribute it and/or modify
  3085. it under the terms of either:
  3086. The LGPL as published by the Free Software Foundation, version
  3087. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  3088. Or:
  3089. The Mozilla Public License Version 1.0. You may obtain a copy of
  3090. the License at http://www.mozilla.org/MPL/
  3091. The original code is icalrestriction.h
  3092. Contributions from:
  3093. Graham Davison (g.m.davison@computer.org)
  3094. ======================================================================*/
  3095. #ifndef ICALRESTRICTION_H
  3096. #define ICALRESTRICTION_H
  3097. #include "libical_ical_export.h"
  3098. /* These must stay in this order for icalrestriction_compare to work */
  3099. typedef enum icalrestriction_kind
  3100. {
  3101. ICAL_RESTRICTION_NONE = 0, /* 0 */
  3102. ICAL_RESTRICTION_ZERO, /* 1 */
  3103. ICAL_RESTRICTION_ONE, /* 2 */
  3104. ICAL_RESTRICTION_ZEROPLUS, /* 3 */
  3105. ICAL_RESTRICTION_ONEPLUS, /* 4 */
  3106. ICAL_RESTRICTION_ZEROORONE, /* 5 */
  3107. ICAL_RESTRICTION_ONEEXCLUSIVE, /* 6 */
  3108. ICAL_RESTRICTION_ONEMUTUAL, /* 7 */
  3109. ICAL_RESTRICTION_UNKNOWN /* 8 */
  3110. } icalrestriction_kind;
  3111. LIBICAL_ICAL_EXPORT int icalrestriction_compare(icalrestriction_kind restr, int count);
  3112. LIBICAL_ICAL_EXPORT int icalrestriction_check(icalcomponent *comp);
  3113. #endif /* !ICALRESTRICTION_H */
  3114. /*======================================================================
  3115. FILE: sspm.h Mime Parser
  3116. CREATOR: eric 25 June 2000
  3117. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  3118. http://www.softwarestudio.org
  3119. The contents of this file are subject to the Mozilla Public License
  3120. Version 1.0 (the "License"); you may not use this file except in
  3121. compliance with the License. You may obtain a copy of the License at
  3122. http://www.mozilla.org/MPL/
  3123. Software distributed under the License is distributed on an "AS IS"
  3124. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
  3125. the License for the specific language governing rights and
  3126. limitations under the License.
  3127. This program is free software; you can redistribute it and/or modify
  3128. it under the terms of either:
  3129. The LGPL as published by the Free Software Foundation, version
  3130. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  3131. Or:
  3132. The Mozilla Public License Version 1.0. You may obtain a copy of
  3133. the License at http://www.mozilla.org/MPL/
  3134. The Initial Developer of the Original Code is Eric Busboom
  3135. ======================================================================*/
  3136. #ifndef ICAL_SSPM_H
  3137. #define ICAL_SSPM_H
  3138. #include "libical_ical_export.h"
  3139. enum sspm_major_type
  3140. {
  3141. SSPM_NO_MAJOR_TYPE,
  3142. SSPM_TEXT_MAJOR_TYPE,
  3143. SSPM_IMAGE_MAJOR_TYPE,
  3144. SSPM_AUDIO_MAJOR_TYPE,
  3145. SSPM_VIDEO_MAJOR_TYPE,
  3146. SSPM_APPLICATION_MAJOR_TYPE,
  3147. SSPM_MULTIPART_MAJOR_TYPE,
  3148. SSPM_MESSAGE_MAJOR_TYPE,
  3149. SSPM_UNKNOWN_MAJOR_TYPE
  3150. };
  3151. enum sspm_minor_type
  3152. {
  3153. SSPM_NO_MINOR_TYPE,
  3154. SSPM_ANY_MINOR_TYPE,
  3155. SSPM_PLAIN_MINOR_TYPE,
  3156. SSPM_RFC822_MINOR_TYPE,
  3157. SSPM_DIGEST_MINOR_TYPE,
  3158. SSPM_CALENDAR_MINOR_TYPE,
  3159. SSPM_MIXED_MINOR_TYPE,
  3160. SSPM_RELATED_MINOR_TYPE,
  3161. SSPM_ALTERNATIVE_MINOR_TYPE,
  3162. SSPM_PARALLEL_MINOR_TYPE,
  3163. SSPM_UNKNOWN_MINOR_TYPE
  3164. };
  3165. enum sspm_encoding
  3166. {
  3167. SSPM_NO_ENCODING,
  3168. SSPM_QUOTED_PRINTABLE_ENCODING,
  3169. SSPM_8BIT_ENCODING,
  3170. SSPM_7BIT_ENCODING,
  3171. SSPM_BINARY_ENCODING,
  3172. SSPM_BASE64_ENCODING,
  3173. SSPM_UNKNOWN_ENCODING
  3174. };
  3175. enum sspm_error
  3176. {
  3177. SSPM_NO_ERROR,
  3178. SSPM_UNEXPECTED_BOUNDARY_ERROR,
  3179. SSPM_WRONG_BOUNDARY_ERROR,
  3180. SSPM_NO_BOUNDARY_ERROR,
  3181. SSPM_NO_HEADER_ERROR,
  3182. SSPM_MALFORMED_HEADER_ERROR
  3183. };
  3184. struct sspm_header
  3185. {
  3186. int def;
  3187. char *boundary;
  3188. enum sspm_major_type major;
  3189. enum sspm_minor_type minor;
  3190. char *minor_text;
  3191. char **content_type_params;
  3192. char *charset;
  3193. enum sspm_encoding encoding;
  3194. char *filename;
  3195. char *content_id;
  3196. enum sspm_error error;
  3197. char *error_text;
  3198. };
  3199. struct sspm_part
  3200. {
  3201. struct sspm_header header;
  3202. int level;
  3203. size_t data_size;
  3204. void *data;
  3205. };
  3206. struct sspm_action_map
  3207. {
  3208. enum sspm_major_type major;
  3209. enum sspm_minor_type minor;
  3210. void *(*new_part) (void);
  3211. void (*add_line) (void *part, struct sspm_header * header, const char *line, size_t size);
  3212. void *(*end_part) (void *part);
  3213. void (*free_part) (void *part);
  3214. };
  3215. LIBICAL_ICAL_EXPORT const char *sspm_major_type_string(enum sspm_major_type type);
  3216. LIBICAL_ICAL_EXPORT const char *sspm_minor_type_string(enum sspm_minor_type type);
  3217. LIBICAL_ICAL_EXPORT const char *sspm_encoding_string(enum sspm_encoding type);
  3218. LIBICAL_ICAL_EXPORT int sspm_parse_mime(struct sspm_part *parts,
  3219. size_t max_parts,
  3220. const struct sspm_action_map *actions,
  3221. char *(*get_string) (char *s, size_t size, void *data),
  3222. void *get_string_data, struct sspm_header *first_header);
  3223. LIBICAL_ICAL_EXPORT void sspm_free_parts(struct sspm_part *parts, size_t max_parts);
  3224. LIBICAL_ICAL_EXPORT char *decode_quoted_printable(char *dest, char *src, size_t *size);
  3225. LIBICAL_ICAL_EXPORT char *decode_base64(char *dest, char *src, size_t *size);
  3226. LIBICAL_ICAL_EXPORT int sspm_write_mime(struct sspm_part *parts, size_t num_parts,
  3227. char **output_string, const char *header);
  3228. #endif /* ICAL_SSPM_H */
  3229. /*======================================================================
  3230. FILE: icalmime.h
  3231. CREATOR: eric 26 July 2000
  3232. (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
  3233. http://www.softwarestudio.org
  3234. This program is free software; you can redistribute it and/or modify
  3235. it under the terms of either:
  3236. The LGPL as published by the Free Software Foundation, version
  3237. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  3238. Or:
  3239. The Mozilla Public License Version 1.0. You may obtain a copy of
  3240. the License at http://www.mozilla.org/MPL/
  3241. ======================================================================*/
  3242. #ifndef ICALMIME_H
  3243. #define ICALMIME_H
  3244. #include "libical_ical_export.h"
  3245. LIBICAL_ICAL_EXPORT icalcomponent *icalmime_parse(char *(*line_gen_func) (char *s,
  3246. size_t size,
  3247. void *d), void *data);
  3248. /* The inverse of icalmime_parse, not implemented yet. Use sspm.h directly. */
  3249. LIBICAL_ICAL_EXPORT char *icalmime_as_mime_string(char *component);
  3250. #endif /* !ICALMIME_H */
  3251. /*======================================================================
  3252. FILE: icallangbind.h
  3253. CREATOR: eric 25 jan 2001
  3254. (C) COPYRIGHT 1999 Eric Busboom <eric@softwarestudio.org>
  3255. http://www.softwarestudio.org
  3256. This program is free software; you can redistribute it and/or modify
  3257. it under the terms of either:
  3258. The LGPL as published by the Free Software Foundation, version
  3259. 2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
  3260. Or:
  3261. The Mozilla Public License Version 1.0. You may obtain a copy of
  3262. the License at http://www.mozilla.org/MPL/
  3263. ======================================================================*/
  3264. #ifndef ICALLANGBIND_H
  3265. #define ICALLANGBIND_H
  3266. #include "libical_ical_export.h"
  3267. LIBICAL_ICAL_EXPORT int *icallangbind_new_array(int size);
  3268. LIBICAL_ICAL_EXPORT void icallangbind_free_array(int *array);
  3269. LIBICAL_ICAL_EXPORT int icallangbind_access_array(int *array, int index);
  3270. LIBICAL_ICAL_EXPORT icalproperty *icallangbind_get_property(icalcomponent *c,
  3271. int n, const char *prop);
  3272. LIBICAL_ICAL_EXPORT const char *icallangbind_get_property_val(icalproperty *p);
  3273. LIBICAL_ICAL_EXPORT const char *icallangbind_get_parameter(icalproperty *p, const char *parameter);
  3274. LIBICAL_ICAL_EXPORT icalcomponent *icallangbind_get_component(icalcomponent *c, const char *comp);
  3275. LIBICAL_ICAL_EXPORT icalproperty *icallangbind_get_first_property(icalcomponent *c,
  3276. const char *prop);
  3277. LIBICAL_ICAL_EXPORT icalproperty *icallangbind_get_next_property(icalcomponent *c,
  3278. const char *prop);
  3279. LIBICAL_ICAL_EXPORT icalcomponent *icallangbind_get_first_component(icalcomponent *c,
  3280. const char *comp);
  3281. LIBICAL_ICAL_EXPORT icalcomponent *icallangbind_get_next_component(icalcomponent *c,
  3282. const char *comp);
  3283. LIBICAL_ICAL_EXPORT icalparameter *icallangbind_get_first_parameter(icalproperty *prop);
  3284. LIBICAL_ICAL_EXPORT icalparameter *icallangbind_get_next_parameter(icalproperty *prop);
  3285. LIBICAL_ICAL_EXPORT const char *icallangbind_property_eval_string(icalproperty *prop, char *sep);
  3286. LIBICAL_ICAL_EXPORT char *icallangbind_property_eval_string_r(icalproperty *prop, char *sep);
  3287. LIBICAL_ICAL_EXPORT int icallangbind_string_to_open_flag(const char *str);
  3288. LIBICAL_ICAL_EXPORT const char *icallangbind_quote_as_ical(const char *str);
  3289. LIBICAL_ICAL_EXPORT char *callangbind_quote_as_ical_r(const char *str);
  3290. #endif
  3291. #ifdef __cplusplus
  3292. }
  3293. #endif
  3294. #endif
  3295. #endif