ICalendarObjects

Since: BlackBerry 10.0.0

#include <bb/pim/calendar/ICalendarObjects>

To link against this class, add the following line to your .pro file: LIBS += -lbbpim

The ICalendarObjects class represents a container for iCalendar objects.

This class holds objects that are constructed by functions that read data in an iCalendar file, such as CalendarService::readICalendarFile() and CalendarService::retrieveICalendarAttachment(). You must parse an iCalendar file using these types of functions before you can retrieve event information from it.

This class contains information that represents both events and tasks (or to-dos). You can call events() to retrieve a QList of events, and you can manipulate the events in an ICalendarObjects object using functions such as addEvent(), setEvents(), and resetEvents(). Similarly, you can call todos() to retrieve a QList of tasks, and you can manipulate the tasks using functions such as addTodo(), setTodos(), and resetTodos().


Overview

Public Functions Index

ICalendarObjects ()
ICalendarObjects (const ICalendarObjects &other)
~ICalendarObjects ()
voidaddEvent (const CalendarEvent &event)
voidaddTodo (const ICalendarTodo &todo)
bb::pim::message::AttachmentKeyattachmentKey () const
QList< CalendarEvent >events () const
boolisValid () const
ICalendarObjects &operator= (const ICalendarObjects &other)
voidresetEvents ()
voidresetTodos ()
voidsetAttachmentKey (bb::pim::message::AttachmentKey attachmentKey)
voidsetEvents (const QList< CalendarEvent > &events)
voidsetTodos (const QList< ICalendarTodo > &todos)
QList< ICalendarTodo >todos () const

Public Functions

ICalendarObjects ()

Constructs a new ICalendarObjects.

Since:

BlackBerry 10.0.0

ICalendarObjects (

Copy constructor.

This function constructs an ICalendarObjects containing exactly the same values as the provided ICalendarObjects.

Parameters
other

The ICalendarObjects to be copied.

Since:

BlackBerry 10.0.0

~ICalendarObjects ()

Destructor.

Since:

BlackBerry 10.0.0

void addEvent (

Adds an event to the list of iCalendar events.

This function adds a new event at the end of the existing list of iCalendar events.

Parameters
event

The event to add.

Since:

BlackBerry 10.0.0

void addTodo (

Adds a task (to-do) to the list of iCalendar tasks.

This function adds a new task at the end of the existing list of iCalendar tasks.

Parameters
todo

The task to add.

Since:

BlackBerry 10.0.0

bb::pim::message::AttachmentKey attachmentKey ()

Retrieves the attachment ID that provided the iCalendar objects.

This function returns the ID for the attachment that provided the iCalendar objects. The ICalendarObjects instance returned by CalendarService::retrieveICalendarAttachment() will have a non-zero value if the message has an iCalendar attachment that is not yet on the device. It's possible to request the download of the attachment by calling bb::pim::message::MessageService::downloadAttachment().

Return:

The attachment ID that provided the iCalendar objects.

Since:

BlackBerry 10.3.0

QList< CalendarEvent > events ()

Retrieves the events in the iCalendar file.

This function returns the calendar events that were parsed from the iCalendar file. Events in an iCalendar file are specified using the VEVENT identifier.

Return:

A list of events from the iCalendar file.

Since:

BlackBerry 10.0.0

bool isValid ()

Indicates whether this ICalendarObjects is valid.

This function determines whether the attributes of this ICalendarObjects object have acceptable values.

Return:

true if this ICalendarObjects is valid, false otherwise.

Since:

BlackBerry 10.0.0

ICalendarObjects & operator= (

Assignment operator.

This operator copies all values from the provided ICalendarObjects into this ICalendarObjects.

Parameters
other

The ICalendarObjects from which to copy all values.

Return:

A reference to this ICalendarObjects.

Since:

BlackBerry 10.0.0

void resetEvents ()

Removes all events.

This function clears the list of iCalendar events.

Since:

BlackBerry 10.0.0

void resetTodos ()

Removes all tasks (to-dos).

This function clears the list of iCalendar tasks.

Since:

BlackBerry 10.0.0

void setAttachmentKey (
  • bb::pim::message::AttachmentKeyattachmentKey)

Sets the attachment ID that provided the iCalendar objects.

This function assigns an attachment ID to this ICalendarObjects object.

Parameters
attachmentKey

The attachment ID to set.

Since:

BlackBerry 10.3.0

void setEvents (

Sets the list of events.

This function changes the list of iCalendar events to the provided set of events.

Parameters
events

The new list of events.

Since:

BlackBerry 10.0.0

void setTodos (

Sets the list of tasks (to-dos).

This function changes the list of iCalendar tasks to the provided set of tasks.

Parameters
todos

The new list of tasks.

Since:

BlackBerry 10.0.0

QList< ICalendarTodo > todos ()

Retrieves the tasks (to-dos) in the iCalendar file.

This function returns the tasks (to-dos) that were parsed from the iCalendar file. Tasks in an iCalendar file are specified using the VTODO identifier.

Return:

A list of tasks from the iCalendar file.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus