Win_adapter


Classes

class  WinContact
 Rapresents a contact object for Windows Clients. More...
class  WinContactSIF
 Rapresents a contact object for Windows Clients, in SIF format. More...
class  WinEvent
 Rapresents an event object for Windows Clients. More...
class  WinEventSIF
 Rapresents an event object for Windows Clients, for SIF format. More...
class  WinItem
 Rapresents an item object for Windows Clients. More...
class  WinNote
 Rapresents a note object for Windows Clients. More...
class  WinNoteSIF
 Rapresents a note object for Windows Clients, for SIF format. More...
class  WinRecipient
 Rapresents a recipient object (attendee) for Windows Clients. More...
class  WinRecurrence
 Rapresents a recurrence pattern object for Windows Clients. More...
class  WinRecurrenceSIF
 Rapresents a recurrence pattern object for Windows Clients, for SIF format. More...
class  WinTask
 Rapresents an event object for Windows Clients. More...
class  WinTaskSIF
 Rapresents an event object for Windows Clients, for SIF format. More...

Defines

#define ERR_ENCRYPT_DATA   "Error occurred encrypting private data"
#define ERR_DECRYPT_DATA   "Error occurred decrypting private data"
#define REFERRED_MAX_DATE   949998.000000
 this is "4501-01-01" in double format: the error date of Outlook
#define LIMIT_MAX_DATE   767011.000000
 this is "4000-01-01" in double format: the max date accepted
#define MAX_DAYLIGHT_PROPS   6
#define VCARD_VERSION   TEXT("2.1")
#define VCALENDAR_VERSION   TEXT("1.0")
#define VNOTE_VERSION   TEXT("1.1")
#define SIF_VERSION   TEXT("1.1")
#define ERR_ITEM_VOBJ_PARSE   "VConverter: error occurred parsing the item data."
#define ERR_ITEM_VOBJ_WRONG_TYPE   "Error: wrong vobject type \"%ls\" (\"%ls\" expected)"
#define ERR_ITEM_VOBJ_TYPE_NOTFOUND   "Error: vobject type not specified (\"%ls\" expected)"
#define ERR_SIFFIELDS_NULL   "Parsing error: sifFields must be initialized before parsing data."
#define INFO_ITEM_VOBJ_WRONG_VERSION   "Warning! Wrong vobject version \"%ls\" (\"%ls\" expected)"
#define INFO_ITEM_VOBJ_VERSION_NOTFOUND   "Warning! VObject version not specified (\"%ls\" expected)"

Typedefs

typedef double DATE
typedef list< wstring > exceptionList
typedef exceptionList::iterator exceptionsIterator
typedef list< WinRecipientrecipientList

Enumerations

enum  WinSensitivity { winNormal = 0, winPersonal = 1, winPrivate = 2, winConfidential = 3 }
 This is defined in MS Outlook and Pocket Outlook libraries. More...
enum  WinDaysOfWeek {
  winSunday = 1, winMonday = 2, winTuesday = 4, winWednesday = 8,
  winThursday = 16, winFriday = 32, winSaturday = 64
}
 This is defined in MS Outlook and Pocket Outlook libraries. More...
enum  WinRecurrenceType {
  winRecursDaily = 0, winRecursWeekly = 1, winRecursMonthly = 2, winRecursMonthNth = 3,
  winRecursYearly = 5, winRecursYearNth = 6
}
 This is defined in MS Outlook and Pocket Outlook libraries. More...
enum  WinNoteColor {
  winBlue = 0, winGreen = 1, winPink = 2, winYellow = 3,
  winWhite = 4, NUM_NOTE_COLOR
}
 This is defined in MS Outlook libraries for note property "Color".

Functions

void toLowerCase (std::string &s)
void toLowerCase (std::wstring &s)
void replaceAll (const std::wstring &source, const std::wstring &dest, std::wstring &dataString, const int startPos=0)
int getElementContent (const std::wstring &xml, const std::wstring &tag, std::wstring &content, unsigned int pos=0)
int getElementContent (const std::wstring &xml, const std::wstring &tag, std::wstring &content, const std::wstring::size_type pos, std::wstring::size_type &start, std::wstring::size_type &end)
char * encryptData (const char *data, const char *password=NULL)
char * decryptData (const char *b64Data, const char *password=NULL)
void doubleToStringTime (std::wstring &stringDate, const DATE doubleDate, bool onlyDate=false)
void stringTimeToDouble (const std::wstring &dataString, DATE *date)
bool isAllDayFormat (const std::wstring &dataString)
bool isAllDayInterval (const DATE startdate, const DATE enddate)
WCHAR * daysOfWeekToString (int l)
int stringToDaysOfWeek (WCHAR *in)
int getWeekDayFromDate (DATE date)
bool isWeekDay (WCHAR *data)
std::wstring getDateFromTzRule (const int year, SYSTEMTIME tzRule)
 Client to Server.
SYSTEMTIME getTzRuleFromDates (std::list< std::wstring > &dates, bool *found)
 Server to Client.
std::wstring formatBias (const int bias)
 Returns a wstring with the given bias formatted like "+/-hhmm".
int parseBias (const WCHAR *data)
 Parse a wide-char string containing bias, like "+0130" or "-08".
bool isSameTimezone (const TIME_ZONE_INFORMATION *tz1, const TIME_ZONE_INFORMATION *tz2)
 Returns true if the passed tz information are the same.
bool isSameSystemtime (const SYSTEMTIME *st1, const SYSTEMTIME *st2)
 Returns true if the passed systemtime are the same.
bool hasDayLightSaving (const TIME_ZONE_INFORMATION *tz)
 Check if the timezone information has a day light saving.
void addPropertyToSIF (std::wstring &sif, const std::wstring propertyName, std::wstring propertyValue)
 Adds a tag "<propertyName>propertyValue</propertyName>" into 'sif' string.
std::wstring formatDateWithMinus (const std::wstring &stringDate)
 Format a date like yyyyMMdd in yyyy-MM-dd.
std::wstring trim (const std::wstring &str)
 Trims the string passed.

Variables

BEGIN_NAMESPACE typedef map<
wstring, wstring >::iterator 
mapIterator

Enumeration Type Documentation

enum WinDaysOfWeek

This is defined in MS Outlook and Pocket Outlook libraries.

Recurring property "DaysOfWeekMask" is one or a combination of following values.

enum WinRecurrenceType

This is defined in MS Outlook and Pocket Outlook libraries.

Following are the possible values for WinRecurrence property "RecurrenceType".

enum WinSensitivity

This is defined in MS Outlook and Pocket Outlook libraries.

Following are the possible values for WinEvent property "Sensitivity".


Function Documentation

void addPropertyToSIF ( std::wstring &  sif,
const std::wstring  propertyName,
std::wstring  propertyValue 
)

Adds a tag "<propertyName>propertyValue</propertyName>" into 'sif' string.

Escapes all the "&", "<", ">" characters inside propertyValue.

Parameters:
sif [IN-OUT] the SIF string where we append data
propertyName name of the SIF field to append
propertyValue value of the SIF field to append

std::wstring formatBias ( const int  bias  ) 

Returns a wstring with the given bias formatted like "+/-hhmm".

Example: bias = 330 -> "-0530"

std::wstring getDateFromTzRule ( const int  year,
SYSTEMTIME  tzRule 
)

Client to Server.

Returns the formatted date of the given year, from the passed timezone rule. SYSTEMTIME structure is used to store dates, but also to store a timezone rule. In the latter, the member 'wDay' is the # of week inside the month (values: 1-4), '5' means "the last week". 'wYear' is = 0 to mean "every year". For example: wMonth=3, wDayOfWeek=0, wDay=2 -> means "the second Sunday of March". Given the tz rule and the desired year, we can extract the date rapresented by this rule, as a SYSTEMTIME, and then format it like a string "yyyyMMddThhmmss".

Parameters:
year the desired year to extract the date
tzRule the timezone rule, as a SYSTEMTIME structure
Returns:
the date formatted like "yyyyMMddThhmmss" (yyyy = year)

SYSTEMTIME getTzRuleFromDates ( std::list< std::wstring > &  dates,
bool *  found 
)

Server to Client.

Returns the timezone rule as a SYSTEMTIME, from a list of dates. The list of dates passed are referred to different years, so that analyzing them we can calculate the tz rule and store it in a SYSTEMTIME. SYSTEMTIME structure is used to store dates, but also to store a timezone rule. Usually only 1 date is enough to get the timezone rule (e.g. date = 2008/10/5 -> tz rule = first Sunday of october). We always suppose that if the occurrence is the 4th of the month we set as the 5th due to a research in the registry of windows. There are no timezone that are in the 4th week but all are in the latest week (5th)

Parameters:
dates list of dates for different years, in format "yyyyMMddThhmmss" (local time)
found if the right value is found really or guess by the rule
Returns:
the timezone rule, as a SYSTEMTIME structure

bool hasDayLightSaving ( const TIME_ZONE_INFORMATION *  tz  ) 

Check if the timezone information has a day light saving.

If all the parameters (day, hours, etc... )are empty, then no daylight saving is supported.

Parameters:
tz the timezone information to check
Returns:
true if timezone needed, false otherwise

bool isSameSystemtime ( const SYSTEMTIME *  st1,
const SYSTEMTIME *  st2 
)

Returns true if the passed systemtime are the same.

Checks all properties, ignoring only seconds and milliseconds.

bool isSameTimezone ( const TIME_ZONE_INFORMATION *  tz1,
const TIME_ZONE_INFORMATION *  tz2 
)

Returns true if the passed tz information are the same.

Checks bias values and dates (names are ignored).

int parseBias ( const WCHAR *  data  ) 

Parse a wide-char string containing bias, like "+0130" or "-08".

Returns the bias as a signed integer (e.g. "+0230" -> -150)


Generated on Tue Jun 10 17:20:22 2008 for Funambol C++ Client Library by  doxygen 1.5.2