Public Member Functions

Barry::Sync::vTimeConverter Class Reference

A virtual base class that the plugins may override, to do time related conversions. More...

#include <vbase.h>

List of all members.

Public Member Functions

virtual std::string unix2vtime (const time_t *timestamp)
 Convert a time_t into an ISO timestamp string Throws Barry::ConvertError on error, but these errors must be rare.
virtual time_t vtime2unix (const char *vtime)
 Convert an ISO timestamp string into a time_t, using the current system timezone if vtime is not in UTC.
virtual int alarmduration2sec (const char *alarm)
 Convert a VEVENT alarm duration string in the format of "[+-]P.W.DT.H.M.S" where the periods represent numbers and each letter besides P and T represent Week, Day, Hour, Minute, and Second respectively.

Detailed Description

A virtual base class that the plugins may override, to do time related conversions.

Default implementations for these functions are provided, but may be overrided depending on need.

We do this in a "callback" style, so that it doesn't matter what version of the opensync library we link against, in case the user wishes to use the opensync time functions.

Definition at line 48 of file vbase.h.


Member Function Documentation

int Barry::Sync::vTimeConverter::alarmduration2sec ( const char *  alarm  )  [virtual]

Convert a VEVENT alarm duration string in the format of "[+-]P.W.DT.H.M.S" where the periods represent numbers and each letter besides P and T represent Week, Day, Hour, Minute, and Second respectively.

Definition at line 73 of file vbase.cc.

std::string Barry::Sync::vTimeConverter::unix2vtime ( const time_t *  timestamp  )  [virtual]

Convert a time_t into an ISO timestamp string Throws Barry::ConvertError on error, but these errors must be rare.

Definition at line 41 of file vbase.cc.

time_t Barry::Sync::vTimeConverter::vtime2unix ( const char *  vtime  )  [virtual]

Convert an ISO timestamp string into a time_t, using the current system timezone if vtime is not in UTC.

Returns (time_t)-1 on error.

Definition at line 57 of file vbase.cc.

References Barry::Sync::TzWrapper::iso_mktime().

Here is the call graph for this function:


The documentation for this class was generated from the following files: