#include <ctime>
#include <string>
#include <vector>
-#include <dpl/optional.h>
#include <dpl/shared_ptr.h>
-#include "CalendarItemGeo.h"
#include "EventAttendee.h"
#include "EventRecurrenceRule.h"
namespace Api {
namespace Calendar {
+#define UNDEFINED_CALENDAR_ID 0
+#define UNDEFINED_ITEM_ID 0
+#define UNDEFINED_GEO 0
+#define UNDEFINED_ID "0"
+
typedef std::vector<std::string> CategoryList;
typedef DPL::SharedPtr<CategoryList> CategoryListPtr;
class CalendarEvent
{
public:
-
- static const int UNDEFINED_CALENDAR_ID = -1;
-
typedef enum
{
TENTATIVE_STATUS,
NEEDS_ACTION_STATUS,
IN_PROCESS_STATUS,
COMPLETED_STATUS,
- INVALID_STATUS = 10000,
UNDEFINED_STATUS
} EventStatus;
NO_ALARM,
SILENT_ALARM,
SOUND_ALARM,
- INVALID_ALARM_TYPE = 10000,
UNDEFINED_ALARM_TYPE
} EventAlarmType;
PUBLIC_VISIBILITY,
PRIVATE_VISIBILITY,
CONFIDENTIAL_VISIBILITY,
- INVALID_VISIBILITY = 10000,
UNDEFINED_VISIBILITY
} EventVisibility;
BUSY_UNAVAILABLE_FB,
FREE_FB,
BUSY_TENTATIVE_FB,
- INVALID_AVAILABILITY = 10000,
UNDEFINED_AVAILABILITY
} EventAvailability;
LOW_PRIORITY,
MEDIUM_PRIORITY,
HIGH_PRIORITY,
- INVALID_PRIORITY = 10000,
UNDEFINED_PRIORITY
} TaskPriority;
{
ICALENDAR_20,
VCALENDAR_10,
- INVALID_FORMAT = 10000,
UNDEFINED_FORMAT
} VObjectFormat;
{
EVENT_TYPE = 0,
TASK_TYPE,
+ UNDEFINED_TYPE
} CalendarType;
void resetId();
bool getIdIsSet() const;
+ int getParentId() const;
+ void setParentId(int value);
+
int getCalendarId() const;
void setCalendarId(int value);
void setAttributesOfInterest(AttributeListPtr value);
AttributeListPtr getAttributesOfInterest() const;
- void setGeolocation(CalendarItemGeoPtr value);
- CalendarItemGeoPtr getGeolocation() const;
+ double getLatitude() const;
+ void setLatitude(double value);
+
+ double getLongitude() const;
+ void setLongitude(double value);
void setTimeZone(std::string value);
std::string getTimeZone() const;
void setCalendarType(CalendarType type);
protected:
- DPL::Optional<int> m_id;
+ int m_id;
+ int m_parentId; // the parent id if it's detached.
int m_calendarId;
std::string m_description;
std::string m_subject;
std::time_t m_lastModifiedDate;
EventVisibility m_visibility;
EventAvailability m_availability;
- std::string m_uid;
+ std::string m_uid; // uid is same with id.
std::time_t m_recurrenceId;
EventAttendeeListPtr m_attendees;
bool m_isDetached;
AttributeListPtr m_attributesOfInterest;
- CalendarItemGeoPtr m_geolocation;
+ double m_latitude;
+ double m_longitude;
std::string m_timeZone;
TaskPriority m_priority;
std::time_t m_createdDate;