src/include/common/vocl/iCalendar/Calendar.h

00001 /*
00002  * Copyright (C) 2003-2007 Funambol, Inc
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License version 2 as
00006  * published by the Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR
00011  * PURPOSE.  See the GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program; if not, write to the Free Software
00015  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00016  * 02111-1307  USA
00017  */
00018 
00019 
00020 #ifndef INCL_ICALENDAR_CALENDAR
00021 #define INCL_ICALENDAR_CALENDAR
00022 
00024 #define ICALENDAR_BUFFER 30000
00025 
00026 #include "vocl/VProperty.h"
00027 #include "vocl/iCalendar/iCalProperty.h"
00028 #include "vocl/iCalendar/Event.h"
00029 #include "vocl/iCalendar/ToDo.h"
00030 
00031 class Calendar
00032 {
00033 private:
00034     iCalProperty* prodID;
00035     iCalProperty* version;
00036     iCalProperty* calScale;
00037     iCalProperty* method;
00038     ArrayList* xTags;
00039     ArrayList* events;
00040     ArrayList* todos;
00041     void set(iCalProperty** oldProperty, iCalProperty& newProperty);
00042     iCalProperty* getiCalPropertyFromVProperty(VProperty* vp);
00043     VProperty* getVPropertyFromiCalProperty(WCHAR* name, iCalProperty* prop);
00044 
00045 public:
00046     Calendar();
00047     ~Calendar();
00048     void setProdID(iCalProperty& p);
00049     void setVersion(iCalProperty& p);
00050     void setCalScale(iCalProperty& p);
00051     void setMethod(iCalProperty& p);
00052     void setXTags(ArrayList& list);
00053     void setEvents(ArrayList& list);
00054     void setToDos(ArrayList& list);
00055     void addEvent(Event* ev);
00056     void addToDo(ToDo* task);
00057     iCalProperty* getProdID();
00058     iCalProperty* getVersion();
00059     iCalProperty* getCalScale();
00060     iCalProperty* getMethod();
00061     ArrayList* getXTags();
00062     ArrayList* getEvents();
00063     ArrayList* getToDos();
00064     WCHAR* toString();
00065 
00066     ArrayElement* clone();
00067 };
00068 
00070 #endif

Generated on Tue Oct 30 15:11:26 2007 for Funambol C++ Client Library by  doxygen 1.5.2