$darkmode
Libical API Documentation 4.0 STABLE VERSION Visit the v3.0 documentation
LibICal::VComponent Class Reference

A class wrapping the libical icalcomponent functions. More...

Inheritance diagram for LibICal::VComponent:
[legend]

Public Member Functions

bool add (VComponent &)
 
void add_component (VComponent *child)
 
void add_property (ICalProperty *property)
 Working with properties.
 
std::string as_ical_string ()
 
icalcompiter begin_component (const icalcomponent_kind &kind)
 Using external iterators.
 
void convert_errors ()
 Convert some X-LIC-ERROR properties into RETURN-STATUS properties.
 
int count_components (const icalcomponent_kind &kind)
 
int count_errors ()
 Working with embedded error properties.
 
int count_properties (const icalproperty_kind &kind)
 
void detach ()
 
icalcompiter end_component (const icalcomponent_kind &kind)
 
std::string get_comment () const
 
VComponentget_current_component ()
 Iterate through components. More...
 
ICalPropertyget_current_property ()
 
std::string get_description () const
 
struct icaltimetype get_dtend () const
 
struct icaltimetype get_dtstamp () const
 
struct icaltimetype get_dtstart () const
 
struct icaltimetype get_due () const
 
struct icaldurationtype get_duration () const
 
VComponentget_first_component (const icalcomponent_kind &kind)
 
ICalPropertyget_first_property (const icalproperty_kind &kind)
 
VComponentget_first_real_component ()
 
VComponentget_inner ()
 
std::string get_location () const
 
icalproperty_method get_method () const
 
VComponentget_next_component (const icalcomponent_kind &kind)
 
ICalPropertyget_next_property (const icalproperty_kind &kind)
 
struct icaltimetype get_recurrenceid () const
 
std::string get_relcalid () const
 
int get_sequence () const
 
virtual struct icaltime_span get_span ()
 
int get_status () const
 
std::string get_summary () const
 
std::string get_uid () const
 
bool is_valid ()
 
icalcomponent_kind isa ()
 
bool isa_component (const void *component)
 
void new_from_string (const std::string &str)
 
 operator icalcomponent * ()
 
VComponentoperator= (const VComponent &)
 
bool recurrence_is_excluded (struct icaltimetype *dtstart, struct icaltimetype *recurtime)
 
bool remove (VComponent &, bool ignoreValue)
 Note: the VComponent kind have to be the same.
 
void remove_component (VComponent *child)
 
void remove_property (ICalProperty *property)
 
void set_comment (const std::string &v)
 
void set_description (const std::string &v)
 
void set_dtend (const struct icaltimetype &v)
 
void set_dtstamp (const struct icaltimetype &v)
 
void set_dtstart (const struct icaltimetype &v)
 
void set_due (const struct icaltimetype &v)
 
void set_duration (const struct icaldurationtype &v)
 
void set_location (const std::string &v)
 
void set_method (const icalproperty_method &method)
 
void set_recurrenceid (const struct icaltimetype &v)
 
void set_relcalid (const std::string &v)
 
void set_sequence (const int &v)
 
void set_status (const enum icalproperty_status &v)
 
void set_summary (const std::string &v)
 
void set_uid (const std::string &v)
 
void strip_errors ()
 Remove all X-LIC-ERROR properties.
 
bool update (VComponent &, bool removeMissing)
 
 VComponent (const VComponent &)
 
 VComponent (icalcomponent *v)
 
 VComponent (const std::string &str)
 Constructor. More...
 
 VComponent (const icalcomponent_kind &kind)
 

Static Public Member Functions

static VComponentcurrent (icalcompiter *i)
 
static std::string kind_to_string (const icalcomponent_kind &kind)
 
static VComponentnext (icalcompiter *i)
 
static VComponentprev (icalcompiter *i)
 
static icalcomponent_kind string_to_kind (const std::string &str)
 Kind conversion routines.
 

Detailed Description

A class wrapping the libical icalcomponent functions.

Exceptions
icalerrorenumAny errors generated in libical are propagated via this exception type.

Definition at line 37 of file vcomponent_cxx.hpp.

Constructor & Destructor Documentation

VComponent::VComponent ( const std::string &  str)
explicit

Constructor.

Create a new VComponent from a string.

Exceptions
ICAL_MALFORMEDDATA_ERRORCatch this error if you

Definition at line 86 of file vcomponent_cxx.cpp.

Member Function Documentation

VComponent * VComponent::get_current_component ( )

Iterate through components.

Iteration Routines. There are two forms of iterators, internal and external. The internal ones came first, and are almost completely sufficient, but they fail badly when you want to construct a loop that removes components from the container.

Definition at line 207 of file vcomponent_cxx.cpp.

struct icaltimetype VComponent::get_dtend ( ) const

For the icalcomponent routines only, dtend and duration are tied together. If you call the set routine for one and the other exists, the routine will calculate the change to the other. That is, if there is a DTEND and you call set_duration, the routine will modify DTEND to be the sum of DTSTART and the duration. If you call a get routine for one and the other exists, the routine will calculate the return value. If you call a set routine and neither exists, the routine will create the appropriate property

Definition at line 352 of file vcomponent_cxx.cpp.

VComponent * VComponent::get_first_real_component ( )

For VCOMPONENT: Return a reference to the first VEVENT, VTODO, or VJOURNAL

Definition at line 493 of file vcomponent_cxx.cpp.

VComponent * VComponent::get_inner ( )

Return the first VEVENT, VTODO or VJOURNAL sub-component if it is one of those types

Definition at line 180 of file vcomponent_cxx.cpp.

struct icaltime_span VComponent::get_span ( )
virtual

For VEVENT, VTODO, VJOURNAL and VTIMEZONE: report the start and end times of an event in UTC

Definition at line 500 of file vcomponent_cxx.cpp.

int VComponent::get_status ( ) const

Returns the status VComponent status.

Returns
the status property or ICAL_STATUS_NONE if a problem parsing the status was detected.

Definition at line 482 of file vcomponent_cxx.cpp.