include/CComponent.h

Go to the documentation of this file.
00001 
00020 #ifndef __CCOMPONENT_H__
00021 #define __CCOMPONENT_H__
00022 
00023 /* Headers */
00024 #include <string>
00025 #include<sstream>
00026 using namespace::std;
00027 using std::string;
00028 #include "CAlarm.h"
00029 #include "CRecurrence.h"
00030 #include "CRecurrenceRule.h"
00031 #include "CAttendee.h"
00032 #include "COrganizer.h"
00033 #include <sys/time.h>
00034 /* supported values for status*/
00035 
00036 typedef enum {
00037     NEEDSACTION_STATUS = 0,
00038     COMPLETED_STATUS,
00039     INPROCESS_STATUS,
00040     CANCELLED_STATUS,
00041     CONFIRMED_STATUS,
00042     TENTATIVE_STATUS,
00043     DRAFT_STATUS,
00044     FINAL_STATUS,
00045     SENT_STATUS,
00046     DECLINED_STATUS,
00047     DELEGATED_STATUS,
00048     ACCEPTED_STATUS,
00049 }statusParam;
00050     
00056 class CComponent {
00057 
00058   public:
00059 
00063     CComponent();
00064 
00068     CComponent(CComponent &);
00069 
00073     CComponent(string description);
00074 
00078     CComponent(string summary, time_t tododue, int status);
00079 
00083     CComponent(string summary, string description, string location, time_t dateStart, time_t dateEnd);
00084 
00088     CComponent(string szuid, string szDescription, time_t stDateStart);
00089 
00098     vector < CRecurrenceRule * >retrieveRecurreceRuleObject();
00099 
00107     const CComponent & operator=(const CComponent & right);
00108 
00125     CComponent(string id, int type,int flags, string summary, string description,
00126                        string location, int status, time_t dateStart, time_t dateEnd,
00127                        time_t lastModified,time_t iCreatedTime);
00128 
00129 
00138     bool setId(string sId);
00139 
00146     string  getId();
00147 
00158     bool setType(int num);
00159 
00166     int getType();
00171     bool setFlags(int iflag);
00172 
00173 
00180     int getFlags();
00181 
00189     bool setSummary(string szSummary);
00190 
00198     string getSummary();
00199 
00200 
00208     bool setDescription(string strDescription);
00209 
00217     string getDescription();
00218 
00219 
00227     bool setLocation(string szLocation);
00228 
00236     string getLocation();
00237 
00238 
00245     bool setStatus(int iStatus);
00246 
00247 
00254     int getStatus();
00255 
00256 
00263     bool setDateStart(time_t dateStart);
00264 
00265 
00272     time_t getDateStart();
00273 
00274 
00275 
00282     bool setDateEnd(time_t dateEnd);
00283 
00284 
00291     time_t getDateEnd();
00292 
00293 
00300     bool setLastModified(time_t lastModified);
00301 
00302 
00309     bool setRecurrence(CRecurrence * ptrRecur);
00316     CRecurrence *getRecurrence();
00317 
00318 
00325     time_t getLastModified();
00326 
00333     bool setUntil(time_t iuntil);
00340     time_t getUntil();
00341 
00350     bool setGUid(string szuid);
00359     string getGUid();
00371     bool setRtype(int irtype);
00372 
00385     int getRtype();
00386 
00393     bool setAlarm(CAlarm * uAlarm);
00394 
00401     CAlarm *getAlarm();
00402 
00409     int getAllDay();
00410 
00417     bool setAllDay(int iAllDay);
00418 
00426     vector < time_t > generateInstanceTimes(time_t viewBegin, time_t viewEnd);
00427 
00434     int getDuration();
00441      bool getRecurrenceProperties();
00448      bool getAlarmProperties();
00449 
00453     virtual ~ CComponent();
00454 
00461     string generateUid ();
00468     void setCreatedTime(time_t iCreatedTime);
00469 
00477     time_t getCreatedTime();
00478 
00479 
00480   private:
00481 
00490     vector < string > extractSubStrings(string SourceString, string byField);
00491 
00492     string sId; 
00494     int iType; 
00496     int iFlags; 
00498     int iStatus; 
00500     time_t iDateStart; 
00502     time_t iDateEnd; 
00504     time_t iLastModified; 
00506     time_t iCreatedTime; 
00508     time_t iuntil; 
00510     int iAllDay; 
00512     string szSummary; 
00514     string szDescription; 
00516     string szLocation; 
00518     string szuid; 
00520     CRecurrence *pRecurrence; 
00522     CAlarm *pAlarm; 
00524 };
00525 
00526 #endif

Generated on Tue Feb 24 16:21:31 2009 for calendar-backend by  doxygen 1.5.1