XCCalendarMonthViewGrid GenerateMonthGrid(int month, int year){
- XCCalendarMonthViewGrid MonthViewOutput;
+ XCCalendarMonthViewGrid monthViewOutput;
// Work out which day of the week the first day of
// the month is.
int previousMonthNumDays = PreviousMonthNumberofDays(month, year);
int previousMonthDays = 0;
int previousMonth = 0;
- int previousYear = Year;
+ int previousYear = year;
int dayWeekCount = 0;
bool processGrid = true;
bool firstWeekProcessing = true;
XCCalendarMonthViewGridDayData dayItem;
- dayItem.Day = previousMonthNumDays - previousMonthDaysProcessing;
- dayItem.Month = previousMonth;
- dayItem.Year = previousYear;
- dayItem.IsInMonth = false;
+ dayItem.day = previousMonthNumDays - previousMonthDaysProcessing;
+ dayItem.month = previousMonth;
+ dayItem.year = previousYear;
+ dayItem.isInMonth = false;
firstWeek.dayList.insert(firstWeek.dayList.begin(), dayItem);
XCCalendarMonthViewGridDayData dayItem;
- dayItem.Day = ProcessDay;
- dayItem.Month = Month;
- dayItem.Year = Year;
- dayItem.IsInMonth = true;
+ dayItem.day = processDay;
+ dayItem.month = month;
+ dayItem.year = year;
+ dayItem.isInMonth = true;
if (firstWeekProcessing == true){
bool posXValid, posYValid, posHValid, posWValid = FALSE;
- posXValid = settingfile->Read(wxT("WindowPositionX"), &posX);
- posYValid = settingfile->Read(wxT("WindowPositionY"), &posY);
- posHValid = settingfile->Read(wxT("WindowPositionHeight"), &posH);
- posWValid = settingfile->Read(wxT("WindowPositionWidth"), &posW);
+ posXValid = settingFile->Read(wxT("WindowPositionX"), &posX);
+ posYValid = settingFile->Read(wxT("WindowPositionY"), &posY);
+ posHValid = settingFile->Read(wxT("WindowPositionHeight"), &posH);
+ posWValid = settingFile->Read(wxT("WindowPositionWidth"), &posW);
if (posXValid == TRUE && posYValid == TRUE && posHValid == TRUE && posWValid == TRUE){
long itemIndex = 0;
bool continueAcc = TRUE;
- continueAcc = cfgFile->GetFirstGroup(accountname, itemIndex);
+ continueAcc = cfgFile->GetFirstGroup(accountName, itemIndex);
while (continueAcc){
cfgFile->Read(wxT("accountdir"), &accDir);
accountAddressValid = cfgFile->Read(wxT("address"), &accAdr);
- accountPortValid = cfgFile->Read(wxT("port"), &AccPort);
- accountSSLValid = cfgFile->Read(wxT("ssl"), &AccSSLInc);
+ accountPortValid = cfgFile->Read(wxT("port"), &accPort);
+ accountSSLValid = cfgFile->Read(wxT("ssl"), &accSSLInc);
if (accSSLInc == wxT("true")){
accSSL = TRUE;
}
accountPortValid = TRUE;
}
- accounts.AddAccount(accountname, wxT("CalDAV"), accAdr, accPort,
+ accounts.AddAccount(accountName, wxT("CalDAV"), accAdr, accPort,
accSSL, accUsr, accPass,
accPrefix, accDir, accRef);
preAccountStage = TRUE;
cfgFile->SetPath(wxT("/"));
- ContinueAcc = cfgfile->GetNextGroup(accountName, itemIndex);
+ continueAcc = cfgFile->GetNextGroup(accountName, itemIndex);
}
// Set the main window data from a wxRect object.
- mainWindowData = WindowData;
+ mainWindowData = windowData;
}
// Setup the default values for XCALPrefAccounts.
- AccountsCount = 0;
+ accountsCount = 0;
}
using namespace std;
-multimap<string, string> ProcessTextVectors(vector<string> *TextProperties,
+multimap<string, string> ProcessTextVectors(vector<string> *textProperties,
vector<string> *textValues,
bool searchMultiple,
string property){
break;
}
- PropertyName += bufferChar;
+ propertyName += bufferChar;
textSeekCount++;
finalNameValue.name = inputData.substr(0, seekCount);
try{
- finalNameValue.Value = inputData.substr((seekCount + 1));
+ finalNameValue.value = inputData.substr((seekCount + 1));
}
catch (const out_of_range &oor){
if (dataFound == false){
- finalNameValue.Name = inputData;
+ finalNameValue.name = inputData;
}
// Get the string before the last hash for the path.
- (*entryURIPath) = calendarEntryHREF->substr(0, (LastForwardSlash + 1));
+ (*entryURIPath) = calendarEntryHREF->substr(0, (lastForwardSlash + 1));
// Get the string after the last hash for the filename.
- (*entryFilename) = calendarEntryHREF->substr((LastForwardSlash + 1));
+ (*entryFilename) = calendarEntryHREF->substr((lastForwardSlash + 1));
}
int lineSeek = 0;
int maxLineSeek = 77;
- for (charSeek = 0; charSeek < TextInput->size(); charSeek++){
+ for (charSeek = 0; charSeek < textInput->size(); charSeek++){
lineSeek++;
outputLine += textInput->substr(charSeek, 1);
}
outputLine += "\n";
- outputTextData += OutputLine;
+ outputTextData += outputLine;
outputLine = " ";
lineSeek = 0;
maxLineSeek = 76;
// Update the settings for the account.
- long itemindex = 0;
+ long itemIndex = 0;
bool continueAcc = TRUE;
wxString accountName;
// Set the data into the calendar event object.
- eventData.SummaryData = txtEventName->GetValue().ToStdString();
- eventData.DescriptionList.push_back(txtEventDescription->GetValue().ToStdString());
- eventData.DescriptionListAltRep.push_back("");
- eventData.DescriptionListLanguage.push_back("");
- eventData.DescriptionListTokens.push_back("");
+ eventData.summaryData = txtEventName->GetValue().ToStdString();
+ eventData.descriptionList.push_back(txtEventDescription->GetValue().ToStdString());
+ eventData.descriptionListAltRep.push_back("");
+ eventData.descriptionListLanguage.push_back("");
+ eventData.descriptionListTokens.push_back("");
stringstream stringData;
stringData << txtStartTime->GetValue().ToStdString().substr(3, 2).c_str();
stringData << "00Z";
- eventData.DateTimeStartData = stringData.str();
- eventData.DateTimeStampData = stringData.str();
+ eventData.dateTimeStartData = stringData.str();
+ eventData.dateTimeStampData = stringData.str();
stringData.str("");
stringData << txtEndTime->GetValue().ToStdString().substr(3, 2).c_str();
stringData << "00Z";
- eventData.DateTimeEndData = stringData.str();
+ eventData.dateTimeEndData = stringData.str();
// TODO: Implement Duration.
eventFile += NewUUID;
eventFile += ".ics";
- eventData.UniqueID = NewUUID;
+ eventData.uniqueID = NewUUID;
// Write the file.
if (directoryCreated == TRUE){
- WriteAccountDetails(cfgfile, wxT("Local"), directoryName);
+ WriteAccountDetails(cfgFile, wxT("Local"), directoryName);
} else {
wxString accountName;
long itemIndex = 0;
bool continueAcc;
- continueAcc = cfgfile->GetFirstGroup(accountName, itemIndex);
+ continueAcc = cfgFile->GetFirstGroup(accountName, itemIndex);
while (continueAcc){
}
cfgFile->SetPath(wxT("/"));
- continueAcc = cfgfile->GetNextGroup(accountName, itemIndex);
+ continueAcc = cfgFile->GetNextGroup(accountName, itemIndex);
}
wxString directoryName = txtAccountName->GetValue().Mid(0, 30) + randomNumberSuffix;
- if (wxMkdir(XestiaCALDirectory + wxT("/accounts/") + directoryName + wxT(".Local"), 0740) == TRUE){
+ if (wxMkdir(xestiaCALDirectory + wxT("/accounts/") + directoryName + wxT(".Local"), 0740) == TRUE){
directoryCreated = TRUE;
if (directoryCreated == TRUE){
- WriteAccountDetails(cfgfile, wxT("Local"), directoryName);
+ WriteAccountDetails(cfgFile, wxT("Local"), directoryName);
} else {
}
- delete cfgfile;
- cfgfile = NULL;
+ delete cfgFile;
+ cfgFile = NULL;
*reloadAccountConfig = true;
accType = preferences->accounts.GetAccountType((int)lstAccountsIndex);
- if (accType != "CardDAV" && AccType != "carddav" &&
- accType != "Local" && AccType != "local"){
+ if (accType != "CardDAV" && accType != "carddav" &&
+ accType != "Local" && accType != "local"){
wxMessageBox(_("Cannot modify the selected account settings as the account type is unsupported."), _("Unsupported account type"), wxICON_ERROR);
return;
//wxString *PageInput;
data = wxString::FromUTF8((char *)ptr);
- stream->Append(Data);
+ stream->Append(data);
return size * nmemb;
// Set a message.
- if (BuildType == wxT("source")){
+ if (buildType == wxT("source")){
// Write message about getting the update
// from Xestia Gelforn.
// Start Date.
- if (eventData.DateTimeStartData.size() < 16){
+ if (eventData.dateTimeStartData.size() < 16){
addResult.addEventResult = CDSENTRY_INVALIDFILE;
return addResult;
}
- eventString = eventData.DateTimeStartData.substr(0,4);
+ eventString = eventData.dateTimeStartData.substr(0,4);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeStartData.substr(4,2);
+ eventString = eventData.dateTimeStartData.substr(4,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeStartData.substr(6,2);
+ eventString = eventData.dateTimeStartData.substr(6,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeStartData.substr(9,2);
+ eventString = eventData.dateTimeStartData.substr(9,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeStartData.substr(11,2);
+ eventString = eventData.dateTimeStartData.substr(11,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeStartData.substr(13,2);
+ eventString = eventData.dateTimeStartData.substr(13,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
int eventEndSecond = 0;
int eventEndDuration = 0;
- if (eventData.DateTimeEndData != ""){
+ if (eventData.dateTimeEndData != ""){
- if (eventData.DateTimeEndData.size() < 16){
+ if (eventData.dateTimeEndData.size() < 16){
addResult.addEventResult = CDSENTRY_INVALIDFILE;
return addResult;
}
- eventString = eventData.DateTimeEndData.substr(0,4);
+ eventString = eventData.dateTimeEndData.substr(0,4);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeEndData.substr(4,2);
+ eventString = eventData.dateTimeEndData.substr(4,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeEndData.substr(6,2);
+ eventString = eventData.dateTimeEndData.substr(6,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeEndData.substr(9,2);
+ eventString = eventData.dateTimeEndData.substr(9,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeEndData.substr(11,2);
+ eventString = eventData.dateTimeEndData.substr(11,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeEndData.substr(13,2);
+ eventString = eventData.dateTimeEndData.substr(13,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DurationData;
+ eventString = eventData.durationData;
// Process the duration data.
// Get the duration (if DTEND hasn't been specified).
- if (eventData.DurationData.size() > 0){
+ if (eventData.durationData.size() > 0){
bool FoundP = false;
bool FoundW = false;
bool DateTimeMode = false;
- std::string::iterator eventDataChar = eventData.DurationData.begin();
+ std::string::iterator eventDataChar = eventData.durationData.begin();
std::string currentValue = "";
if (*eventDataChar != 'P'){
- eventDataChar = eventData.DurationData.end();
+ eventDataChar = eventData.durationData.end();
}
- for(eventDataChar; eventDataChar != eventData.DurationData.end(); eventDataChar++){
+ for(eventDataChar; eventDataChar != eventData.durationData.end(); eventDataChar++){
// Check if value is a digit.
// Process Entry Name.
- resultCode = sqlite3_bind_text(statementHandle, 2, eventData.SummaryData.c_str(), -1, SQLITE_STATIC);
+ resultCode = sqlite3_bind_text(statementHandle, 2, eventData.summaryData.c_str(), -1, SQLITE_STATIC);
if (resultCode != 0){
addResult.addEventResult = CDSENTRY_FAILED;
string eventDescription;
try {
- eventDescription = eventData.DescriptionList.at(0);
+ eventDescription = eventData.descriptionList.at(0);
}
catch (out_of_range &err){
// Start Date.
- if (eventData.DateTimeStartData.size() < 16){
+ if (eventData.dateTimeStartData.size() < 16){
editResult.editEventResult = CDSENTRY_INVALIDFILE;
return editResult;
}
- eventString = eventData.DateTimeStartData.substr(0,4);
+ eventString = eventData.dateTimeStartData.substr(0,4);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeStartData.substr(4,2);
+ eventString = eventData.dateTimeStartData.substr(4,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeStartData.substr(6,2);
+ eventString = eventData.dateTimeStartData.substr(6,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeStartData.substr(9,2);
+ eventString = eventData.dateTimeStartData.substr(9,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeStartData.substr(11,2);
+ eventString = eventData.dateTimeStartData.substr(11,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeStartData.substr(13,2);
+ eventString = eventData.dateTimeStartData.substr(13,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
int eventEndSecond = 0;
int eventEndDuration = 0;
- if (eventData.DateTimeEndData != ""){
+ if (eventData.dateTimeEndData != ""){
- if (eventData.DateTimeEndData.size() < 16){
+ if (eventData.dateTimeEndData.size() < 16){
editResult.editEventResult = CDSENTRY_INVALIDFILE;
return editResult;
}
- eventString = eventData.DateTimeEndData.substr(0,4);
+ eventString = eventData.dateTimeEndData.substr(0,4);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeEndData.substr(4,2);
+ eventString = eventData.dateTimeEndData.substr(4,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeEndData.substr(6,2);
+ eventString = eventData.dateTimeEndData.substr(6,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeEndData.substr(9,2);
+ eventString = eventData.dateTimeEndData.substr(9,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeEndData.substr(11,2);
+ eventString = eventData.dateTimeEndData.substr(11,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DateTimeEndData.substr(13,2);
+ eventString = eventData.dateTimeEndData.substr(13,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
}
- eventString = eventData.DurationData;
+ eventString = eventData.durationData;
// Process the duration data.
// Get the duration (if DTEND hasn't been specified).
- if (eventData.DurationData.size() > 0){
+ if (eventData.durationData.size() > 0){
bool FoundP = false;
bool FoundW = false;
bool DateTimeMode = false;
- std::string::iterator eventDataChar = eventData.DurationData.begin();
+ std::string::iterator eventDataChar = eventData.durationData.begin();
std::string currentValue = "";
if (*eventDataChar != 'P'){
- eventDataChar = eventData.DurationData.end();
+ eventDataChar = eventData.durationData.end();
}
- for(eventDataChar; eventDataChar != eventData.DurationData.end(); eventDataChar++){
+ for(eventDataChar; eventDataChar != eventData.durationData.end(); eventDataChar++){
// Check if value is a digit.
// Process Entry Name.
- resultCode = sqlite3_bind_text(statementHandle, 2, eventData.SummaryData.c_str(), -1, SQLITE_STATIC);
+ resultCode = sqlite3_bind_text(statementHandle, 2, eventData.summaryData.c_str(), -1, SQLITE_STATIC);
if (resultCode != 0){
editResult.editEventResult = CDSENTRY_FAILED;
string eventDescription;
try {
- eventDescription = eventData.DescriptionList.at(0);
+ eventDescription = eventData.descriptionList.at(0);
}
catch (out_of_range &err){
// Get the data from href.
- CalendarHomeURI = FetchXMLData(&nodeSeek);
+ calendarHomeURI = FetchXMLData(&nodeSeek);
xmlFreeDoc(xmlCalDAVDoc);
for (nodeSeek = xmlCalDAVDoc->children;
nodeSeek != NULL;
- nodeSeek = NodeSeek->next)
+ nodeSeek = nodeSeek->next)
{
if (!xmlStrcmp(nodeSeek->name, (const xmlChar *)"multistatus") ||
for (nodeSeek = xmlCalDAVDoc->children;
nodeSeek != NULL;
- nodeSeek = NodeSeek->next)
+ nodeSeek = nodeSeek->next)
{
if (!xmlStrcmp(nodeSeek->name, (const xmlChar *)"multistatus") ||
}
- string nodeNameSmallD = "d:" + NodeName;
- string nodeNameLargeD = "D:" + NodeName;
+ string nodeNameSmallD = "d:" + nodeName;
+ string nodeNameLargeD = "D:" + nodeName;
xmlNodePtr *nodePtr = nodePtrOriginal;
size_t CalDAVSend(char *sendBuffer, size_t size, size_t newMemoryBytes, void *dataStruct){
- struct CalDAVSendData *uploadPtr = (struct calDAVSendData *)dataStruct;
+ struct CalDAVSendData *uploadPtr = (struct CalDAVSendData *)dataStruct;
if (uploadPtr->sizeleft){
// Setup the server password.
- ServerUserPass += connectionData.username;
- ServerUserPass += ":";
- ServerUserPass += connectionData.password;
+ serverUserPass += connectionData.username;
+ serverUserPass += ":";
+ serverUserPass += connectionData.password;
curl_easy_setopt(connectionHandle, CURLOPT_URL, serverAddress.c_str());
curl_easy_setopt(connectionHandle, CURLOPT_USERPWD, serverUserPass.c_str());
curl_easy_setopt(connectionHandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_easy_setopt(connectionHandle, CURLOPT_FAILONERROR, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_TIMEOUT, connectionData.timeout);
- curl_easy_setopt(connectionHandle, CURLOPT_WRITEFUNCTION, calDAVReceive);
+ curl_easy_setopt(connectionHandle, CURLOPT_WRITEFUNCTION, CalDAVReceive);
curl_easy_setopt(connectionHandle, CURLOPT_WRITEDATA, &serverData);
curl_easy_setopt(connectionHandle, CURLOPT_WRITEHEADER, &serverHeader);
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PROPFIND");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &userPrincipalSendData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Process the data.
// Set the results.
if (serverResult == CURLE_OK){
- connectionServerResult.Result = CALDAVQUERYRESULT_OK;
+ connectionServerResult.result = CALDAVQUERYRESULT_OK;
} else {
- connectionServerResult.Result = CALDAVQUERYRESULT_SERVERERROR;
+ connectionServerResult.result = CALDAVQUERYRESULT_SERVERERROR;
}
- connectionServerResult.Code = serverResult;
- curl_easy_getinfo(connectionHandle, CURLINFO_RESPONSE_CODE, &connectionServerResult.HTTPCode);
+ connectionServerResult.code = serverResult;
+ curl_easy_getinfo(connectionHandle, CURLINFO_RESPONSE_CODE, &connectionServerResult.httpCode);
if (serverResult != CURLE_OK){
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PROPFIND");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &calendarHomeSendData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Process the data.
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PROPFIND");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &calendarListSendData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Process the data.
connectionServerResult.code = serverResult;
curl_easy_getinfo(connectionHandle, CURLINFO_RESPONSE_CODE, &connectionServerResult.httpCode);
- if (cerverResult != CURLE_OK){
+ if (serverResult != CURLE_OK){
return serverList;
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "REPORT");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &entryListSendData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Process the data.
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "REPORT");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &entryListSendData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Process the data.
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "REPORT");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &updatedEntryListSendData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Get the updated calendar data.
if (userPrincipalURI.size() == 0){
- return ServerResult;
+ return serverResult;
}
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "MKCALENDAR");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &calendarAddSendData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Process the data.
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PROPPATCH");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &calendarEditSendData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Process the data.
CURLcode serverConnectionResult = curl_easy_perform(connectionHandle);
- if (serverConnectionRsult == CURLE_OK){
+ if (serverConnectionResult == CURLE_OK){
serverResult.result = CALDAVQUERYRESULT_OK;
} else {
serverResult.result = CALDAVQUERYRESULT_SERVERERROR;
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, NULL);
curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, NULL);
- return ServerResult;
+ return serverResult;
}
}
-CalDAVServerResult CalDAV::EditCalendar(string *CalendarHREF,
- Colour *CalendarColour){
-
+CalDAVServerResult CalDAV::EditCalendar(string *calendarHREF,
+ Colour *calendarColour){
CalDAVServerResult serverResult;
CURLcode serverConnectionResult = curl_easy_perform(connectionHandle);
if (serverConnectionResult == CURLE_OK){
- serverResult.Result = CALDAVQUERYRESULT_OK;
+ serverResult.result = CALDAVQUERYRESULT_OK;
} else {
- serverResult.Result = CALDAVQUERYRESULT_SERVERERROR;
+ serverResult.result = CALDAVQUERYRESULT_SERVERERROR;
}
serverResult.code = serverConnectionResult;
curl_easy_getinfo(connectionHandle, CURLINFO_RESPONSE_CODE, &serverResult.httpCode);
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "REPORT");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &entryETagGetData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Attempt to get the entity tag.
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &entryAddSendData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Process the data.
curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &entryAddSendData);
- curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+ curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
// Process the data.
if (statusLanguage.size() > 0){
dataLine += ";LANGUAGE=";
- dataLine += StatusLanguage;
+ dataLine += statusLanguage;
}
}
- if (attachListTokens[AttachListSeek].size() > 0){
+ if (attachListTokens[attachListSeek].size() > 0){
dataLine += ";";
dataLine += attachListTokens[attachListSeek];
dataLine += "TRIGGER";
- if (calendarAlarmData[CalendarAlarmDataSeek].triggerRelated.size() > 0){
+ if (calendarAlarmData[calendarAlarmDataSeek].triggerRelated.size() > 0){
dataLine += ";RELATED=";
- dataLine += calendarAlarmData[CalendarAlarmDataSeek].triggerRelated;
+ dataLine += calendarAlarmData[calendarAlarmDataSeek].triggerRelated;
}
if (calendarAlarmData[calendarAlarmDataSeek].triggerTokens.size() > 0){
dataLine += ";";
- dataLine += calendarAlarmData[calendarAlarmDataSeek].TriggerTokens;
+ dataLine += calendarAlarmData[calendarAlarmDataSeek].triggerTokens;
}
if (calendarAlarmData[calendarAlarmDataSeek].durationTokens.size() > 0){
dataLine += ";";
- dataLine += calendarAlarmData[CalendarAlarmDataSeek].durationTokens;
+ dataLine += calendarAlarmData[calendarAlarmDataSeek].durationTokens;
}
for (vector<string>::iterator iter = objectName.begin();
iter != objectName.end(); iter++){
- if (objectName[SeekCount] == "END" &&
- objectData[SeekCount] == "VEVENT"){
+ if (objectName[seekCount] == "END" &&
+ objectData[seekCount] == "VEVENT"){
if (validEnd == false){
validEnd = true;
dataReceived = ProcessTextVectors(&objectName, &objectData, false, "LOCATION");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
bool tokenData = false;
string propertyTokens;
if (propertyTokens.size() > 0){
- organiserDataTokens = PropertyTokens;
+ organiserDataTokens = propertyTokens;
}
}
- statusData = DataReceived.begin()->second;
+ statusData = dataReceived.begin()->second;
}
dataReceived = ProcessTextVectors(&objectName, &objectData, false, "DURATION");
- if (dataReceived.begin() != dataReceived.end()){
+ bool tokenData = false;
+ string propertyTokens;
+ if (dataReceived.begin() != dataReceived.end()){
+
durationData = dataReceived.begin()->second;
+ propertyNameData = (string*)&dataReceived.begin()->first;
+
+ propertyData = SplitValues(*propertyNameData);
+
+ for(map<string,string>::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
+
+ if (tokenData == false){
+ tokenData = true;
+ } else {
+ propertyTokens += ";";
+ }
+
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
+
+ }
+
+ if (propertyTokens.size() > 0){
+ durationDataTokens = propertyTokens;
+ }
+
}
}
} else if (dataiter->first == "DELEGATED-TO"){
- AttendeeListDelegatedTo[ObjectSeekCount] = dataiter->second;
+ attendeeListDelegatedTo[objectSeekCount] = dataiter->second;
} else if (dataiter->first == "DELEGATED-FROM"){
bool tokenData = false;
string propertyTokens;
- PropertyNameData = (string*)&iter->first;
+ propertyNameData = (string*)&iter->first;
- PropertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
- for(map<string,string>::iterator dataiter = PropertyData.begin();
- dataiter != PropertyData.end(); dataiter++){
+ for(map<string,string>::iterator dataiter = propertyData.begin();
+ dataiter != propertyData.end(); dataiter++){
if (dataiter->first == "RELTYPE"){
- RelatedToDataRelationType[ObjectSeekCount] = dataiter->second;
+ relatedToDataRelationType[objectSeekCount] = dataiter->second;
} else {
- if (TokenData == false){
- TokenData = true;
+ if (tokenData == false){
+ tokenData = true;
} else {
- PropertyTokens += ";";
+ propertyTokens += ";";
}
- PropertyTokens += dataiter->first;
- PropertyTokens += "=";
- PropertyTokens += dataiter->second;
+ propertyTokens += dataiter->first;
+ propertyTokens += "=";
+ propertyTokens += dataiter->second;
}
}
- if (PropertyTokens.size() > 0){
- RelatedToDataTokens[ObjectSeekCount] = PropertyTokens;
+ if (propertyTokens.size() > 0){
+ relatedToDataTokens[objectSeekCount] = propertyTokens;
}
- RelatedToData[ObjectSeekCount] = iter->second;
+ relatedToData[objectSeekCount] = iter->second;
- ObjectSeekCount++;
+ objectSeekCount++;
}
}
if (propertyTokens.size() > 0){
- newAlarmData.attendeeListTokens[objectSeekCount] = PropertyTokens;
+ newAlarmData.attendeeListTokens[objectSeekCount] = propertyTokens;
}
newAlarmData.attendeeList[objectSeekCount] = iter->second;
if (xtokeniter->substr(0,2) == "X-" &&
xtokeniter->size() > 2){
- newAlarmData.xTokensData.push_back(EventAlarmData[seekCount][alarmObjectCount]);
- newAlarmData.xTokensDataTokens.push_back(EventAlarmName[seekCount][alarmObjectCount]);
+ newAlarmData.xTokensData.push_back(eventAlarmData[seekCount][alarmObjectCount]);
+ newAlarmData.xTokensDataTokens.push_back(eventAlarmName[seekCount][alarmObjectCount]);
}
}
- DataLine += ":";
- DataLine += AttendeeList[AttendeeListSeek];
- DataLine += "\n";
+ dataLine += ":";
+ dataLine += attendeeList[attendeeListSeek];
+ dataLine += "\n";
- DataLineProcessed = OutputText(&DataLine);
+ dataLineProcessed = OutputText(&dataLine);
- *SaveData += DataLineProcessed;
+ *saveData += dataLineProcessed;
- DataLine.clear();
- DataLineProcessed.clear();
+ dataLine.clear();
+ dataLineProcessed.clear();
}
iter != objectName.end(); iter++){
try{
- PropertyName = objectName[seekCount].substr(0,3);
+ propertyName = objectName[seekCount].substr(0,3);
}
catch(const out_of_range& oor){
propertyNameData = (string*)&iter->first;
- propertyData = SplitValues(propertyNameData);
+ propertyData = SplitValues(*propertyNameData);
for(map<string,string>::iterator dataiter = propertyData.begin();
dataiter != propertyData.end(); dataiter++){
}
dataLine += ":";
- dataLine += UniqueID;
+ dataLine += uniqueID;
dataLine += "\n";
dataLineProcessed = OutputText(&dataLine);
}
- if (OrganiserDataTokens.size() > 0){
+ if (organiserDataTokens.size() > 0){
dataLine += ";";
dataLine += organiserDataTokens;
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
}
- if dDescriptionListLanguage[descriptionListSeek].size() > 0){
+ if (descriptionListLanguage[descriptionListSeek].size() > 0){
dataLine += ";LANGUAGE=";
dataLine += descriptionListLanguage[descriptionListSeek];
if (relatedToDataTokens[requestToDataSeek].size() > 0){
dataLine += ";";
- dataLine += RelatedToDataTokens[requestToDataSeek];
+ dataLine += relatedToDataTokens[requestToDataSeek];
}
dataLine += xTokensDataTokens[xTokenSeek];
dataLine += ":";
dataLine += xTokensData[xTokenSeek];
- dDataLine += "\n";
+ dataLine += "\n";
dataLineProcessed = OutputText(&dataLine);
for (vector<string>::iterator iter = objectName.begin();
iter != objectName.end(); iter++){
- if (objectName[SeekCount] == "END" &&
- objectData[SeekCount] == "VJOURNAL"){
+ if (objectName[seekCount] == "END" &&
+ objectData[seekCount] == "VJOURNAL"){
if (validEnd == false){
validEnd = true;
multimap<string,string> dataReceived;
map<string,string> propertyData;
- string *PropertyNameData = nullptr;
+ string *propertyNameData = nullptr;
int objectSeekCount = 0;
// Get the Date Time Stamp (DTSTAMP).
}
- statusData = DataReceived.begin()->second;
+ statusData = dataReceived.begin()->second;
}
}
if (propertyTokens.size() > 0){
- attachListTokens[objectSeekCount] = PropertyTokens;
+ attachListTokens[objectSeekCount] = propertyTokens;
}
attachList[objectSeekCount] = iter->second;
propertyNameData = (string*)&iter->first;
- propertyData = SplitValues(*PropertyNameData);
+ propertyData = SplitValues(*propertyNameData);
for(map<string,string>::iterator dataiter = propertyData.begin();
dataiter != propertyData.end(); dataiter++){
bool colonFound = false;
bool quoteMode = false;
char bufferChar = 0;
- int stringDataSize = LoadStringData->size();
+ int stringDataSize = loadStringData->size();
int seekCount = 0;
string propertyName;
string propertyValue;
}
- processBaseData();
- processData();
+ ProcessBaseData();
+ ProcessData();
return stringProcResult;
objectData[seekCount] == "VALARM" &&
validAlarmBegin == true){
- eventAlarmName.push_back(AlarmObjectName);
- eventAlarmData.push_back(AlarmObjectData);
+ eventAlarmName.push_back(alarmObjectName);
+ eventAlarmData.push_back(alarmObjectData);
alarmObjectName.clear();
alarmObjectData.clear();
using namespace std;
-void CalendarTaskObject::SaveObjectData(string *SaveData){
+void CalendarTaskObject::SaveObjectData(string *saveData){
string dataLine = "";
string dataLineProcessed = "";
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLine += "PRIORITY";
- if (PriorityTokens.size() > 0){
+ if (priorityTokens.size() > 0){
dataLine += ";";
dataLine += priorityTokens;
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
// Process the RELATED-TO value.
- if (RelatedToData.size() > 0){
+ if (relatedToData.size() > 0){
- for (int requestToDataSeek = 0; requestToDataSeek < RelatedToData.size();
+ for (int requestToDataSeek = 0; requestToDataSeek < relatedToData.size();
requestToDataSeek++){
dataLine += "RELATED-TO";
- if (RelatedToDataRelationType[requestToDataSeek].size() > 0){
+ if (relatedToDataRelationType[requestToDataSeek].size() > 0){
dataLine += ";RELTYPE=";
- dataLine += RelatedToDataRelationType[requestToDataSeek];
+ dataLine += relatedToDataRelationType[requestToDataSeek];
}
- if (RelatedToDataTokens[requestToDataSeek].size() > 0){
+ if (relatedToDataTokens[requestToDataSeek].size() > 0){
dataLine += ";";
- dataLine += RelatedToDataTokens[requestToDataSeek];
+ dataLine += relatedToDataTokens[requestToDataSeek];
}
dataLine += ":";
- dataLine += RelatedToData[requestToDataSeek];
+ dataLine += relatedToData[requestToDataSeek];
dataLine += "\n";
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
for (int calendarAlarmDataSeek = 0; calendarAlarmDataSeek < calendarAlarmData.size();
calendarAlarmDataSeek++){
- *SaveData += "BEGIN:VALARM\n";
+ *saveData += "BEGIN:VALARM\n";
// Process the ACTION VALARM value.
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
}
- *SaveData += "END:VALARM\n";
+ *saveData += "END:VALARM\n";
}
// Process the X-Token values.
- if (xTokenData.size() > 0){
+ if (xTokensData.size() > 0){
- for (int XTokenSeek = 0; XTokenSeek < xTokenData.size();
- XTokenSeek++){
+ for (int xTokensSeek = 0; xTokensSeek < xTokensData.size();
+ xTokensSeek++){
- dataLine += xTokenDataTokens[XTokenSeek];
+ dataLine += xTokensDataTokens[xTokensSeek];
dataLine += ":";
- dataLine += xTokenData[XTokenSeek];
+ dataLine += xTokensData[xTokensSeek];
dataLine += "\n";
dataLineProcessed = OutputText(&dataLine);
- *SaveData += dataLineProcessed;
+ *saveData += dataLineProcessed;
dataLine.clear();
dataLineProcessed.clear();
}
- *SaveData += "END:VTODO\n";
+ *saveData += "END:VTODO\n";
}
\ No newline at end of file
for (vector<string>::iterator iter = objectName.begin();
iter != objectName.end(); iter++){
- if (objectName[SeekCount] == "END" &&
- objectData[SeekCount] == "VTODO"){
+ if (objectName[seekCount] == "END" &&
+ objectData[seekCount] == "VTODO"){
if (validEnd == false){
validEnd = true;
// Process the data from COMPLETED.
- dataReceived = processTextVectors(&ObjectName, &ObjectData, false, "COMPLETED");
+ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "COMPLETED");
if (dataReceived.begin() != dataReceived.end()){
dataReceived = ProcessTextVectors(&objectName, &objectData, false, "CREATED");
- if (DataReceived.begin() != DataReceived.end()){
+ if (dataReceived.begin() != dataReceived.end()){
try {
dateTimeCreatedTokens = dataReceived.begin()->first.substr(8);
if (propertyTokens.size() > 0){
descriptionListTokens.clear();
- descriptionListTokens.push_back(PropertyTokens);
+ descriptionListTokens.push_back(propertyTokens);
}
descriptionList.clear();
}
if (propertyTokens.size() > 0){
- commentListTokens[objectSeekCount] = PropertyTokens;
+ commentListTokens[objectSeekCount] = propertyTokens;
}
commentList[objectSeekCount] = iter->second;
}
if (propertyTokens.size() > 0){
- excludeDateDataTokens[ObjectSeekCount] = propertyTokens;
+ excludeDateDataTokens[objectSeekCount] = propertyTokens;
}
excludeDateData[objectSeekCount] = iter->second;
}
if (propertyTokens.size() > 0){
- resourcesDataTokens[objectSeekCount] = PropertyTokens;
+ resourcesDataTokens[objectSeekCount] = propertyTokens;
}
resourcesData[objectSeekCount] = iter->second;
bool tokenData = false;
string propertyTokens;
- propertyameData = (string*)&dataReceived.begin()->first;
+ propertyNameData = (string*)&dataReceived.begin()->first;
propertyData = SplitValues(*propertyNameData);
xtokeniter->size() > 2){
newAlarmData.xTokensData.push_back(eventAlarmData[seekCount][alarmObjectCount]);
- newAlarmData.xTokensDataTokens.push_back(EventAlarmName[seekCount][alarmObjectCount]);
+ newAlarmData.xTokensDataTokens.push_back(eventAlarmName[seekCount][alarmObjectCount]);
}
// You should have received a copy of the GNU General Public License along
// with Xestia Calendar. If not, see <http://www.gnu.org/licenses/>
-#include "Calendartimezone.h"
+#include "CalendarTimezone.h"
using namespace std;
-void CalendartimezoneObject::SaveObjectData(string *saveData){
+void CalendarTimezoneObject::SaveObjectData(string *saveData){
string dataLine = "";
string dataLineProcessed = "";
iter != objectName.end(); iter++){
try{
- PropertyName = objectName[seekCount].substr(0,4);
+ propertyName = objectName[seekCount].substr(0,4);
}
catch(const out_of_range& oor){
continue;
}
- if (PropertyName == "TZID"){
+ if (propertyName == "TZID"){
if (validTimeZoneID == false){
validTimeZoneID = true;
bool timeZoneOffsetToFound = false;
bool timeZoneOffsetFromFound = false;
- timezoneDataStruct newTZData;
+ TimezoneDataStruct newTZData;
// Process the data from DTSTART.
#include <map>
using namespace std;
-string EntryCalendarHREFProcessing = "";
-string EntryUUID = "";
+string entryCalendarHREFProcessing = "";
+string entryUUID = "";
TEST(CalDAV, BasicTests){
CalDAVStatus calDAVPlainStatus = calDAVPlain.GetConnectionData();
- ASSERT_EQ(calDAVPlainStatus.Hostname, connPlain.Hostname);
- ASSERT_EQ(calDAVPlainStatus.Username, connPlain.Username);
- ASSERT_EQ(calDAVPlainStatus.Port, connPlain.Port);
- ASSERT_EQ(calDAVPlainStatus.Prefix, connPlain.Prefix);
- ASSERT_EQ(calDAVPlainStatus.UseSSL, connPlain.UseSSL);
+ ASSERT_EQ(calDAVPlainStatus.hostname, connPlain.hostname);
+ ASSERT_EQ(calDAVPlainStatus.username, connPlain.username);
+ ASSERT_EQ(calDAVPlainStatus.port, connPlain.port);
+ ASSERT_EQ(calDAVPlainStatus.prefix, connPlain.prefix);
+ ASSERT_EQ(calDAVPlainStatus.useSSL, connPlain.useSSL);
// Verify that the connection was successful.
- CalDAVServerResult connResult = CalDAVPlain.Connect();
+ CalDAVServerResult connResult = calDAVPlain.Connect();
- ASSERT_EQ(CALDAVQUERYRESULT_OK, connResult.Result);
- ASSERT_EQ(200, connResult.HTTPCode);
- ASSERT_EQ(CURLE_OK, connResult.Code);
+ ASSERT_EQ(CALDAVQUERYRESULT_OK, connResult.result);
+ ASSERT_EQ(200, connResult.httpCode);
+ ASSERT_EQ(CURLE_OK, connResult.code);
// Do another connection and this time the connection should
// fail due to being an invalid host name.
CalDAVConnectionData connPlainFail;
- connPlainFail.Hostname = "server.invalid";
- connPlainFail.Username = "fail";
- connPlainFail.Password = "fail";
- connPlainFail.Port = 80;
- connPlainFail.UseSSL = false;
+ connPlainFail.hostname = "server.invalid";
+ connPlainFail.username = "fail";
+ connPlainFail.password = "fail";
+ connPlainFail.port = 80;
+ connPlainFail.useSSL = false;
// Setup the CalDAV connection object.
connResult = calDAVPlainFail.Connect();
- ASSERT_EQ(CALDAVQUERYRESULT_SERVERERROR, connResult.Result);
- ASSERT_EQ(0, connResult.HTTPCode);
- ASSERT_EQ(CURLE_COULDNT_RESOLVE_HOST, connResult.Code);
+ ASSERT_EQ(CALDAVQUERYRESULT_SERVERERROR, connResult.result);
+ ASSERT_EQ(0, connResult.httpCode);
+ ASSERT_EQ(CURLE_COULDNT_RESOLVE_HOST, connResult.code);
// (*nix version) Setup an initial connection (with a valid
// SSL certificate).
CalDAVStatus calDAVNormalStatus = calDAVNormal.GetConnectionData();
- ASSERT_EQ(calDAVNormalStatus.Hostname, connNormal.Hostname);
- ASSERT_EQ(calDAVNormalStatus.Username, connNormal.Username);
- ASSERT_EQ(calDAVNormalStatus.Port, connNormal.Port);
- ASSERT_EQ(calDAVNormalStatus.Prefix, connNormal.Prefix);
- ASSERT_EQ(calDAVNormalStatus.UseSSL, connNormal.UseSSL);
+ ASSERT_EQ(calDAVNormalStatus.hostname, connNormal.hostname);
+ ASSERT_EQ(calDAVNormalStatus.username, connNormal.username);
+ ASSERT_EQ(calDAVNormalStatus.port, connNormal.port);
+ ASSERT_EQ(calDAVNormalStatus.prefix, connNormal.prefix);
+ ASSERT_EQ(calDAVNormalStatus.useSSL, connNormal.useSSL);
// Verify that the connection was successful (with a valid
// SSL certificate).
- connResult = CalDAVNormal.Connect();
+ connResult = calDAVNormal.Connect();
- ASSERT_EQ(CALDAVQUERYRESULT_OK, connResult.Result);
- ASSERT_EQ(200, connResult.HTTPCode);
- ASSERT_EQ(CURLE_OK, connResult.Code);
+ ASSERT_EQ(CALDAVQUERYRESULT_OK, connResult.result);
+ ASSERT_EQ(200, connResult.httpCode);
+ ASSERT_EQ(CURLE_OK, connResult.code);
// (*nix version) Setup an initial connection on a server that
// will fail due to having an invalid SSL certificate.
CalDAVStatus calDAVInvalidSSLStatus = calDAVInvalidSSL.GetConnectionData();
- ASSERT_EQ(calDAVInvalidSSLStatus.Hostname, connInvalidSSL.Hostname);
- ASSERT_EQ(calDAVInvalidSSLStatus.Username, connInvalidSSL.Username);
- ASSERT_EQ(calDAVInvalidSSLStatus.Port, connInvalidSSL.Port);
- ASSERT_EQ(calDAVInvalidSSLStatus.Prefix, connInvalidSSL.Prefix);
- ASSERT_EQ(calDAVInvalidSSLStatus.UseSSL, connInvalidSSL.UseSSL);
+ ASSERT_EQ(calDAVInvalidSSLStatus.hostname, connInvalidSSL.hostname);
+ ASSERT_EQ(calDAVInvalidSSLStatus.username, connInvalidSSL.username);
+ ASSERT_EQ(calDAVInvalidSSLStatus.port, connInvalidSSL.port);
+ ASSERT_EQ(calDAVInvalidSSLStatus.prefix, connInvalidSSL.prefix);
+ ASSERT_EQ(calDAVInvalidSSLStatus.useSSL, connInvalidSSL.useSSL);
// Verify that the connection had failed. (with an invalid
// SSL certificate).
connResult = calDAVInvalidSSL.Connect();
- ASSERT_EQ(CALDAVQUERYRESULT_SERVERERROR, connResult.Result);
- ASSERT_EQ(0, connResult.HTTPCode);
- ASSERT_EQ(CURLE_SSL_CACERT, connResult.Code);
+ ASSERT_EQ(CALDAVQUERYRESULT_SERVERERROR, connResult.result);
+ ASSERT_EQ(0, connResult.httpCode);
+ ASSERT_EQ(CURLE_SSL_CACERT, connResult.code);
// (*nix version) Setup an inital connection on a server where
// a timeout occurs.
- connTimeout.Timeout = 5;
+ connTimeout.timeout = 5;
CalDAV calDAVTimeout;
calDAVTimeout.SetupConnectionData(&connTimeout);
CalDAVStatus calDAVTimeoutStatus = calDAVTimeout.GetConnectionData();
- ASSERT_EQ(calDAVTimeoutStatus.Hostname, connTimeout.Hostname);
- ASSERT_EQ(calDAVTimeoutStatus.Username, connTimeout.Username);
- ASSERT_EQ(calDAVTimeoutStatus.Port, connTimeout.Port);
- ASSERT_EQ(calDAVTimeoutStatus.Prefix, connTimeout.Prefix);
- ASSERT_EQ(calDAVTimeoutStatus.Timeout, connTimeout.Timeout);
- ASSERT_EQ(calDAVTimeoutStatus.UseSSL, connTimeout.UseSSL);
+ ASSERT_EQ(calDAVTimeoutStatus.hostname, connTimeout.hostname);
+ ASSERT_EQ(calDAVTimeoutStatus.username, connTimeout.username);
+ ASSERT_EQ(calDAVTimeoutStatus.port, connTimeout.port);
+ ASSERT_EQ(calDAVTimeoutStatus.prefix, connTimeout.prefix);
+ ASSERT_EQ(calDAVTimeoutStatus.timeout, connTimeout.timeout);
+ ASSERT_EQ(calDAVTimeoutStatus.useSSL, connTimeout.useSSL);
// Verify that the connection had timed out.
connResult = calDAVTimeout.Connect();
- ASSERT_EQ(CALDAVQUERYRESULT_SERVERERROR, connResult.Result);
- ASSERT_EQ(0, connResult.HTTPCode);
- ASSERT_EQ(CURLE_OPERATION_TIMEDOUT, connResult.Code);
+ ASSERT_EQ(CALDAVQUERYRESULT_SERVERERROR, connResult.result);
+ ASSERT_EQ(0, connResult.httpCode);
+ ASSERT_EQ(CURLE_OPERATION_TIMEDOUT, connResult.code);
}
// Setup the server address.
- if (connNormal.UseSSL == true){
+ if (connNormal.useSSL == true){
serverAddress += "https://";
} else {
serverAddress += "http://";
if (connNormal.port != 80){
serverAddress += ":";
- serverAddress += to_string(ConnNormal.Port);
+ serverAddress += to_string(connNormal.port);
}
serverAddress += "/principals/";
// Check the response from the server.
- connResult = cerverConnection.GetServerResult();
+ connResult = serverConnection.GetServerResult();
- EXPECT_EQ(CALDAVQUERYRESULT_OK, connResult.Result);
- ASSERT_EQ(207, connResult.HTTPCode);
- ASSERT_EQ(CURLE_OK, connResult.Code);
+ EXPECT_EQ(CALDAVQUERYRESULT_OK, connResult.result);
+ ASSERT_EQ(207, connResult.httpCode);
+ ASSERT_EQ(CURLE_OK, connResult.code);
// Get the calendar home.
- string calendarHome = serverConnection.GetCalendarHome(CurrentUserPrincipal);
+ string calendarHome = serverConnection.GetCalendarHome(currentUserPrincipal);
// Check the response from the server.
CalDAVServerResult connResult = serverConnection.Connect();
- EXPECT_EQ(CALDAVQUERYRESULT_OK, connResult.Result);
+ EXPECT_EQ(CALDAVQUERYRESULT_OK, connResult.result);
ASSERT_EQ(200, connResult.httpCode);
ASSERT_EQ(CURLE_OK, connResult.code);
CalDAVServerSupport connSupport = serverConnection.GetServerSupport();
connResult = serverConnection.GetServerResult();
- EXPECT_EQ(CALDAVQUERYRESULT_OK, connResult.Result);
+ EXPECT_EQ(CALDAVQUERYRESULT_OK, connResult.result);
ASSERT_EQ(200, connResult.httpCode);
ASSERT_EQ(CURLE_OK, connResult.code);
ASSERT_EQ(true, connSupport.basicSupport);
bool itemFound = false;
for (map<int,string>::iterator calendarNameIter = calendarList.name.begin();
- calendarNameIter != calendarList.Name.end(); calendarNameIter++){
+ calendarNameIter != calendarList.name.end(); calendarNameIter++){
if (calendarNameIter->second == "Scratching Calendar"){
itemFound = true;
// Connect to the server.
- CalDAVServerResult connResult = ServerConnection.Connect();
+ CalDAVServerResult connResult = serverConnection.Connect();
EXPECT_EQ(CALDAVQUERYRESULT_OK, connResult.result);
ASSERT_EQ(200, connResult.httpCode);
string calendarTagURL = "";
for (std::map<int,string>::iterator calHREFIter = calendarList.href.begin();
- calHREFIter != calendarList.HREF.end(); calHREFIter++){
+ calHREFIter != calendarList.href.end(); calHREFIter++){
if (calHREFIter->second.substr(calHREFIter->second.length() - 13) == "/unittestcal/"){
nameValueResult = SplitNameValue("TEST=OK");
- string PropertyName = nameValueResult.name;
- string PropertyValue = nameValueResult.value;
+ string propertyName = nameValueResult.name;
+ string propertyValue = nameValueResult.value;
ASSERT_EQ(propertyName, "TEST");
ASSERT_EQ(propertyValue, "OK");
TEST(CommonFunctions, monthViewGenerator){
- XCCalendarmonthViewGrid monthView = GenerateMonthGrid(6, 2016);
+ XCCalendarMonthViewGrid monthView = GenerateMonthGrid(6, 2016);
// First week.
std::string descriptionTokens;
if (testEvent.descriptionList.begin() != testEvent.descriptionList.end()){
- DescriptionData = testEvent.descriptionList[0];
+ descriptionData = testEvent.descriptionList[0];
}
if (testEvent.descriptionListAltRep.begin() != testEvent.descriptionListAltRep.end()){
- DescriptionAltRep = testEvent.descriptionListAltRep[0];
+ descriptionAltRep = testEvent.descriptionListAltRep[0];
}
if (testEvent.descriptionListLanguage.begin() != testEvent.descriptionListLanguage.end()){
- DescriptionLanguage = testEvent.descriptionListLanguage[0];
+ descriptionLanguage = testEvent.descriptionListLanguage[0];
}
if (testEvent.descriptionListTokens.begin() != testEvent.descriptionListTokens.end()){
- DescriptionTokens = testEvent.descriptionListTokens[0];
+ descriptionTokens = testEvent.descriptionListTokens[0];
}
ASSERT_EQ("This is a description of the event.", descriptionData);
ASSERT_EQ(CALENDAROBJECTLOAD_OK, testEvent2.LoadFile("iCalendarEvent-Load3.vcf"));
ASSERT_EQ(CALENDAROBJECTVALID_OK, testEvent2.ValidBaseObject());
- ASSERT_EQ("PT1H", testEvent2.DurationData);
- ASSERT_EQ("TEST=EXAMPLE", testEvent2.DurationDataTokens);
+ ASSERT_EQ("PT1H", testEvent2.durationData);
+ ASSERT_EQ("TEST=EXAMPLE", testEvent2.durationDataTokens);
// Tests for ATTACH. First ATTACH property.
}
- if (testEvent.AttachListValue.size() > 2){
+ if (testEvent.attachListValue.size() > 2){
attachDataValue = testEvent.attachListValue[2];
}
- if (testEvent.AttachListFormatType.size() > 2){
+ if (testEvent.attachListFormatType.size() > 2){
attachDataEncoding = testEvent.attachListEncoding[2];
}
- if (testEvent.AttachListTokens.size() > 2){
+ if (testEvent.attachListTokens.size() > 2){
attachDataTokens = testEvent.attachListTokens[2];
std::string categoryTokens;
- if (testEvent.CategoriesList.size() > 2){
+ if (testEvent.categoriesList.size() > 2){
- categoryData = testEvent.CategoriesList[2];
+ categoryData = testEvent.categoriesList[2];
}
- if (testEvent.CategoriesList.size() > 2){
+ if (testEvent.categoriesList.size() > 2){
- categoryLanguage = testEvent.CategoriesListLanguage[2];
+ categoryLanguage = testEvent.categoriesListLanguage[2];
}
- if (testEvent.CategoriesList.size() > 2){
+ if (testEvent.categoriesList.size() > 2){
- categoryTokens = testEvent.CategoriesListTokens[2];
+ categoryTokens = testEvent.categoriesListTokens[2];
}
if (testEvent.calendarAlarmData.size() > 0){
- ActionData = testEvent.calendarAlarmData[0].alarmAction;
- ActionDataTokens = testEvent.calendarAlarmData[0].alarmActionTokens;
+ actionData = testEvent.calendarAlarmData[0].alarmAction;
+ actionDataTokens = testEvent.calendarAlarmData[0].alarmActionTokens;
- TriggerData = testEvent.calendarAlarmData[0].triggerData;
- TriggerRelated = testEvent.calendarAlarmData[0].triggerRelated;
- TriggerValue = testEvent.calendarAlarmData[0].triggerValue;
- TriggerTokens = testEvent.calendarAlarmData[0].triggerTokens;
+ triggerData = testEvent.calendarAlarmData[0].triggerData;
+ triggerRelated = testEvent.calendarAlarmData[0].triggerRelated;
+ triggerValue = testEvent.calendarAlarmData[0].triggerValue;
+ triggerTokens = testEvent.calendarAlarmData[0].triggerTokens;
- DurationData = testEvent.calendarAlarmData[0].durationData;
- DurationTokens = testEvent.calendarAlarmData[0].durationTokens;
+ durationData = testEvent.calendarAlarmData[0].durationData;
+ durationTokens = testEvent.calendarAlarmData[0].durationTokens;
- RepeatData = testEvent.calendarAlarmData[0].repeatData;
- RepeatTokens = testEvent.calendarAlarmData[0].repeatTokens;
+ repeatData = testEvent.calendarAlarmData[0].repeatData;
+ repeatTokens = testEvent.calendarAlarmData[0].repeatTokens;
}
if (testEvent.calendarAlarmData[0].attachList.begin() != testEvent.calendarAlarmData[0].attachList.end()){
- AttachData = testEvent.attachList[0];
+ attachData = testEvent.attachList[0];
}
- if (testEvent.calendarAlarmData[0].attachListFormatType.begin() != testEvent.calendaralarmData[0].attachListFormatType.end()){
+ if (testEvent.calendarAlarmData[0].attachListFormatType.begin() != testEvent.calendarAlarmData[0].attachListFormatType.end()){
attachDataFormatType = testEvent.attachListFormatType[0];
// Tests for UID.
- ASSERT_EQ("b3a16392-ad86-4061-be53-c215af2306ff", testFreeBusy.UniqueID);
- ASSERT_EQ("UNIQUEPARAM=CERTAINLY;OKAY=MAYBENOT", testFreeBusy.UniqueIDTokens);
+ ASSERT_EQ("b3a16392-ad86-4061-be53-c215af2306ff", testFreeBusy.uniqueID);
+ ASSERT_EQ("UNIQUEPARAM=CERTAINLY;OKAY=MAYBENOT", testFreeBusy.uniqueIDTokens);
// Tests for CONTACT.
}
- ASSERT_EQ("attendee One", attendeeData);
+ ASSERT_EQ("Attendee One", attendeeData);
// Second ATTENDEE property.
std::string freeBusyData;
- if (testFreeBusy.FreeBusyList.begin() != testFreeBusy.FreeBusyList.end()){
+ if (testFreeBusy.freeBusyList.begin() != testFreeBusy.freeBusyList.end()){
- freeBusyData = testFreeBusy.FreeBusyList[0];
+ freeBusyData = testFreeBusy.freeBusyList[0];
}
std::string freeBusyType;
- if (testFreeBusy.FreeBusyList.size() > 1){
+ if (testFreeBusy.freeBusyList.size() > 1){
- freeBusyData = testFreeBusy.FreeBusyList[1];
+ freeBusyData = testFreeBusy.freeBusyList[1];
}
- if (testFreeBusy.FreeBusyListType.size() > 1){
+ if (testFreeBusy.freeBusyListType.size() > 1){
- freeBusyType = testFreeBusy.FreeBusyListType[1];
+ freeBusyType = testFreeBusy.freeBusyListType[1];
}
std::string FreeBusyTokens;
- if (testFreeBusy.FreeBusyList.size() > 2){
+ if (testFreeBusy.freeBusyList.size() > 2){
- freeBusyData = testFreeBusy.FreeBusyList[2];
+ freeBusyData = testFreeBusy.freeBusyList[2];
}
- if (testFreeBusy.FreeBusyListType.size() > 2){
+ if (testFreeBusy.freeBusyListType.size() > 2){
- freeBusyType = testFreeBusy.FreeBusyListType[2];
+ freeBusyType = testFreeBusy.freeBusyListType[2];
}
- if (testFreeBusy.FreeBusyListTokens.size() > 2){
+ if (testFreeBusy.freeBusyListTokens.size() > 2){
- FreeBusyTokens = testFreeBusy.FreeBusyListTokens[2];
+ FreeBusyTokens = testFreeBusy.freeBusyListTokens[2];
}
std::string recurrenceDate;
- if (testJournal.RecurranceDateData.begin() != testJournal.RecurranceDateData.end()){
+ if (testJournal.recurranceDateData.begin() != testJournal.recurranceDateData.end()){
- recurrenceDate = testJournal.RecurranceDateData[0];
+ recurrenceDate = testJournal.recurranceDateData[0];
}
std::string recurrenceDateTimeZoneParam;
std::string recurrenceDateValue;
- if (testJournal.RecurranceDateData.size() > 1){
+ if (testJournal.recurranceDateData.size() > 1){
- recurrenceDate = testJournal.RecurranceDateData[1];
+ recurrenceDate = testJournal.recurranceDateData[1];
}
- if (testJournal.RecurranceDateData.size() > 1){
+ if (testJournal.recurranceDateData.size() > 1){
- recurrenceDateTimeZoneParam = testJournal.RecurranceDateDataTimeZoneParam[1];
+ recurrenceDateTimeZoneParam = testJournal.recurranceDateDataTimeZoneParam[1];
}
- if (testJournal.RecurranceDateData.size() > 1){
+ if (testJournal.recurranceDateData.size() > 1){
- recurrenceDateValue = testJournal.RecurranceDateDataValue[1];
+ recurrenceDateValue = testJournal.recurranceDateDataValue[1];
}
std::string RecurrenceTokens;
- if (testJournal.RecurranceDateData.size() > 2){
+ if (testJournal.recurranceDateData.size() > 2){
- recurrenceDate = testJournal.RecurranceDateData[2];
+ recurrenceDate = testJournal.recurranceDateData[2];
}
- if (testJournal.RecurranceDateData.size() > 2){
+ if (testJournal.recurranceDateData.size() > 2){
- RecurrenceTokens = testJournal.RecurranceDateDataTokens[2];
+ RecurrenceTokens = testJournal.recurranceDateDataTokens[2];
}
// Tests for the first VALARM property.
- std::string ActionData;
- std::string ActionDataTokens;
+ std::string actionData;
+ std::string actionDataTokens;
- std::string TriggerData;
- std::string TriggerRelated;
- std::string TriggerValue;
- std::string TriggerTokens;
+ std::string triggerData;
+ std::string triggerRelated;
+ std::string triggerValue;
+ std::string triggerTokens;
- std::string DurationData;
- std::string DurationTokens;
+ std::string durationData;
+ std::string durationTokens;
- std::string RepeatData;
- std::string RepeatTokens;
+ std::string repeatData;
+ std::string repeatTokens;
std::string xTokenData;
std::string xTokenName;
if (testTask.calendarAlarmData.size() > 0){
- ActionData = testTask.calendarAlarmData[0].AlarmAction;
- ActionDataTokens = testTask.calendarAlarmData[0].AlarmActionTokens;
+ actionData = testTask.calendarAlarmData[0].alarmAction;
+ actionDataTokens = testTask.calendarAlarmData[0].alarmActionTokens;
- TriggerData = testTask.calendarAlarmData[0].TriggerData;
- TriggerRelated = testTask.calendarAlarmData[0].TriggerRelated;
- TriggerValue = testTask.calendarAlarmData[0].TriggerValue;
- TriggerTokens = testTask.calendarAlarmData[0].TriggerTokens;
+ triggerData = testTask.calendarAlarmData[0].triggerData;
+ triggerRelated = testTask.calendarAlarmData[0].triggerRelated;
+ triggerValue = testTask.calendarAlarmData[0].triggerValue;
+ triggerTokens = testTask.calendarAlarmData[0].triggerTokens;
- DurationData = testTask.calendarAlarmData[0].DurationData;
- DurationTokens = testTask.calendarAlarmData[0].DurationTokens;
+ durationData = testTask.calendarAlarmData[0].durationData;
+ durationTokens = testTask.calendarAlarmData[0].durationTokens;
- RepeatData = testTask.calendarAlarmData[0].RepeatData;
- RepeatTokens = testTask.calendarAlarmData[0].RepeatTokens;
+ repeatData = testTask.calendarAlarmData[0].repeatData;
+ repeatTokens = testTask.calendarAlarmData[0].repeatTokens;
}
- ASSERT_EQ("AUDIO", ActionData);
- ASSERT_EQ("FUNKY=SOUNDS", ActionDataTokens);
+ ASSERT_EQ("AUDIO", actionData);
+ ASSERT_EQ("FUNKY=SOUNDS", actionDataTokens);
- ASSERT_EQ("20160220T160000Z", TriggerData);
- ASSERT_EQ("END", TriggerRelated);
- ASSERT_EQ("DATE-TIME", TriggerValue);
- ASSERT_EQ("PUSH=BUTTON", TriggerTokens);
+ ASSERT_EQ("20160220T160000Z", triggerData);
+ ASSERT_EQ("END", triggerRelated);
+ ASSERT_EQ("DATE-TIME", triggerValue);
+ ASSERT_EQ("PUSH=BUTTON", triggerTokens);
- ASSERT_EQ("PT5H", DurationData);
- ASSERT_EQ("FLYING=NO", DurationTokens);
+ ASSERT_EQ("PT5H", durationData);
+ ASSERT_EQ("FLYING=NO", durationTokens);
- ASSERT_EQ("PT5M", RepeatData);
- ASSERT_EQ("NEVER=SLEEP", RepeatTokens);
+ ASSERT_EQ("PT5M", repeatData);
+ ASSERT_EQ("NEVER=SLEEP", repeatTokens);
// Tests for ATTACH. First ATTACH property.
// Tests for the second VALARM property.
- ActionData.clear();
- ActionDataTokens.clear();
+ actionData.clear();
+ actionDataTokens.clear();
- TriggerData.clear();
- TriggerRelated.clear();
- TriggerValue.clear();
- TriggerTokens.clear();
+ triggerData.clear();
+ triggerRelated.clear();
+ triggerValue.clear();
+ triggerTokens.clear();
- DurationData.clear();
- DurationTokens.clear();
+ durationData.clear();
+ durationTokens.clear();
- RepeatData.clear();
- RepeatTokens.clear();
+ repeatData.clear();
+ repeatTokens.clear();
xTokenData.clear();
xTokenName.clear();
if (testTask.calendarAlarmData.size() > 1){
- ActionData = testTask.calendarAlarmData[1].AlarmAction;
- ActionDataTokens = testTask.calendarAlarmData[1].AlarmActionTokens;
+ actionData = testTask.calendarAlarmData[1].alarmAction;
+ actionDataTokens = testTask.calendarAlarmData[1].alarmActionTokens;
- TriggerData = testTask.calendarAlarmData[1].TriggerData;
- TriggerRelated = testTask.calendarAlarmData[1].TriggerRelated;
- TriggerValue = testTask.calendarAlarmData[1].TriggerValue;
- TriggerTokens = testTask.calendarAlarmData[1].TriggerTokens;
+ triggerData = testTask.calendarAlarmData[1].triggerData;
+ triggerRelated = testTask.calendarAlarmData[1].triggerRelated;
+ triggerValue = testTask.calendarAlarmData[1].triggerValue;
+ triggerTokens = testTask.calendarAlarmData[1].triggerTokens;
- DurationData = testTask.calendarAlarmData[1].DurationData;
- DurationTokens = testTask.calendarAlarmData[1].DurationTokens;
+ durationData = testTask.calendarAlarmData[1].durationData;
+ durationTokens = testTask.calendarAlarmData[1].durationTokens;
- RepeatData = testTask.calendarAlarmData[1].RepeatData;
- RepeatTokens = testTask.calendarAlarmData[1].RepeatTokens;
+ repeatData = testTask.calendarAlarmData[1].repeatData;
+ repeatTokens = testTask.calendarAlarmData[1].repeatTokens;
descriptionData = testTask.calendarAlarmData[1].descriptionData;
descriptionAltRep = testTask.calendarAlarmData[1].descriptionAltRep;
}
- ASSERT_EQ("DISPLAY", ActionData);
- ASSERT_EQ("FLASHING=LIGHTS", ActionDataTokens);
+ ASSERT_EQ("DISPLAY", actionData);
+ ASSERT_EQ("FLASHING=LIGHTS", actionDataTokens);
- ASSERT_EQ("20160230T110000Z", TriggerData);
- ASSERT_EQ("END", TriggerRelated);
- ASSERT_EQ("DATE-TIME", TriggerValue);
- ASSERT_EQ("PUSH=BUTTON", TriggerTokens);
+ ASSERT_EQ("20160230T110000Z", triggerData);
+ ASSERT_EQ("END", triggerRelated);
+ ASSERT_EQ("DATE-TIME", triggerValue);
+ ASSERT_EQ("PUSH=BUTTON", triggerTokens);
- ASSERT_EQ("PT7H", DurationData);
- ASSERT_EQ("FLYING=YES", DurationTokens);
+ ASSERT_EQ("PT7H", durationData);
+ ASSERT_EQ("FLYING=YES", durationTokens);
- ASSERT_EQ("PT3M", RepeatData);
- ASSERT_EQ("SLEEP=ALWAYS", RepeatTokens);
+ ASSERT_EQ("PT3M", repeatData);
+ ASSERT_EQ("SLEEP=ALWAYS", repeatTokens);
ASSERT_EQ("This is the second alarm.", descriptionData);
ASSERT_EQ("null:nodata", descriptionAltRep);
// Tests for the third VALARM property.
- ActionData.clear();
- ActionDataTokens.clear();
+ actionData.clear();
+ actionDataTokens.clear();
- TriggerData.clear();
- TriggerRelated.clear();
- TriggerValue.clear();
- TriggerTokens.clear();
+ triggerData.clear();
+ triggerRelated.clear();
+ triggerValue.clear();
+ triggerTokens.clear();
- DurationData.clear();
- DurationTokens.clear();
+ durationData.clear();
+ durationTokens.clear();
- RepeatData.clear();
- RepeatTokens.clear();
+ repeatData.clear();
+ repeatTokens.clear();
xTokenData.clear();
xTokenName.clear();
descriptionLanguage.clear();
descriptionTokens.clear();
- string SummaryData;
- string SummaryAltRep;
- string SummaryLanguage;
- string SummaryTokens;
+ string summaryData;
+ string summaryAltRep;
+ string summaryLanguage;
+ string summaryTokens;
string attendeeDataMember;
string attendeeDataDelegatedFrom;
if (testTask.calendarAlarmData.size() > 2){
- ActionData = testTask.calendarAlarmData[2].AlarmAction;
- ActionDataTokens = testTask.calendarAlarmData[2].AlarmActionTokens;
+ actionData = testTask.calendarAlarmData[2].alarmAction;
+ actionDataTokens = testTask.calendarAlarmData[2].alarmActionTokens;
- TriggerData = testTask.calendarAlarmData[2].TriggerData;
- TriggerRelated = testTask.calendarAlarmData[2].TriggerRelated;
- TriggerValue = testTask.calendarAlarmData[2].TriggerValue;
- TriggerTokens = testTask.calendarAlarmData[2].TriggerTokens;
+ triggerData = testTask.calendarAlarmData[2].triggerData;
+ triggerRelated = testTask.calendarAlarmData[2].triggerRelated;
+ triggerValue = testTask.calendarAlarmData[2].triggerValue;
+ triggerTokens = testTask.calendarAlarmData[2].triggerTokens;
- DurationData = testTask.calendarAlarmData[2].DurationData;
- DurationTokens = testTask.calendarAlarmData[2].DurationTokens;
+ durationData = testTask.calendarAlarmData[2].durationData;
+ durationTokens = testTask.calendarAlarmData[2].durationTokens;
- RepeatData = testTask.calendarAlarmData[2].RepeatData;
- RepeatTokens = testTask.calendarAlarmData[2].RepeatTokens;
+ repeatData = testTask.calendarAlarmData[2].repeatData;
+ repeatTokens = testTask.calendarAlarmData[2].repeatTokens;
descriptionData = testTask.calendarAlarmData[2].descriptionData;
descriptionAltRep = testTask.calendarAlarmData[2].descriptionAltRep;
descriptionLanguage = testTask.calendarAlarmData[2].descriptionLanguage;
descriptionTokens = testTask.calendarAlarmData[2].descriptionTokens;
- SummaryData = testTask.calendarAlarmData[2].SummaryData;
- SummaryAltRep = testTask.calendarAlarmData[2].SummaryAltRep;
- SummaryLanguage = testTask.calendarAlarmData[2].SummaryLanguage;
- SummaryTokens = testTask.calendarAlarmData[2].SummaryTokens;
+ summaryData = testTask.calendarAlarmData[2].summaryData;
+ summaryAltRep = testTask.calendarAlarmData[2].summaryAltRep;
+ summaryLanguage = testTask.calendarAlarmData[2].summaryLanguage;
+ summaryTokens = testTask.calendarAlarmData[2].summaryTokens;
}
- ASSERT_EQ("EMAIL", ActionData);
- ASSERT_EQ("FLASHING=LIGHTS", ActionDataTokens);
+ ASSERT_EQ("EMAIL", actionData);
+ ASSERT_EQ("FLASHING=LIGHTS", actionDataTokens);
- ASSERT_EQ("20160230T120000Z", TriggerData);
- ASSERT_EQ("END", TriggerRelated);
- ASSERT_EQ("DATE-TIME", TriggerValue);
- ASSERT_EQ("PUSH=BUTTON", TriggerTokens);
+ ASSERT_EQ("20160230T120000Z", triggerData);
+ ASSERT_EQ("END", triggerRelated);
+ ASSERT_EQ("DATE-TIME", triggerValue);
+ ASSERT_EQ("PUSH=BUTTON", triggerTokens);
- ASSERT_EQ("PT7H", DurationData);
- ASSERT_EQ("FLYING=YES", DurationTokens);
+ ASSERT_EQ("PT7H", durationData);
+ ASSERT_EQ("FLYING=YES", durationTokens);
- ASSERT_EQ("PT3M", RepeatData);
- ASSERT_EQ("SLEEP=ALWAYS", RepeatTokens);
+ ASSERT_EQ("PT3M", repeatData);
+ ASSERT_EQ("SLEEP=ALWAYS", repeatTokens);
ASSERT_EQ("This is the third alarm.", descriptionData);
ASSERT_EQ("null:nodata", descriptionAltRep);
ASSERT_EQ("kw", descriptionLanguage);
ASSERT_EQ("TERRIBLE=TOKEN", descriptionTokens);
- ASSERT_EQ("This is the summary of the third alarm.", SummaryData);
- ASSERT_EQ("null:nodata", SummaryAltRep);
- ASSERT_EQ("en", SummaryLanguage);
- ASSERT_EQ("MEEP=MOOP", SummaryTokens);
+ ASSERT_EQ("This is the summary of the third alarm.", summaryData);
+ ASSERT_EQ("null:nodata", summaryAltRep);
+ ASSERT_EQ("en", summaryLanguage);
+ ASSERT_EQ("MEEP=MOOP", summaryTokens);
// Tests for ATTENDEE. First ATTENDEE property.
std::string timeZoneOffsetToData;
std::string timeZoneOffsetFromData;
- if (testTimezone.timeZoneStandardCollection.size() > 0){
+ if (testTimezone.timezoneStandardCollection.size() > 0){
- dateTimeStartData = testTimezone.timeZoneStandardCollection[0].dateTimeStartData;
+ dateTimeStartData = testTimezone.timezoneStandardCollection[0].dateTimeStartData;
}
- if (testTimezone.timeZoneStandardCollection.size() > 0){
+ if (testTimezone.timezoneStandardCollection.size() > 0){
- timeZoneOffsetToData = testTimezone.timeZoneStandardCollection[0].timeZoneOffsetToData;
+ timeZoneOffsetToData = testTimezone.timezoneStandardCollection[0].timeZoneOffsetToData;
}
- if (testTimezone.timeZoneStandardCollection.size() > 0){
+ if (testTimezone.timezoneStandardCollection.size() > 0){
- timeZoneOffsetFromData = testTimezone.timeZoneStandardCollection[0].timeZoneOffsetFromData;
+ timeZoneOffsetFromData = testTimezone.timezoneStandardCollection[0].timeZoneOffsetFromData;
}
std::string recurranceDateData;
std::string recurranceDateValue;
- std::string recurranceDateDatatimeZoneParam;
+ std::string recurranceDateDataTimeZoneParam;
std::string recurranceDateDataTokens;
std::string timeZoneNameData;
timeZoneOffsetToData.clear();
timeZoneOffsetFromData.clear();
- if (testTimezone.timeZoneStandardCollection.size() > 1){
+ if (testTimezone.timezoneStandardCollection.size() > 1){
- dateTimeStartData = testTimezone.timeZoneStandardCollection[1].dateTimeStartData;
- dateTimeStartTokens = testTimezone.timeZoneStandardCollection[1].dateTimeStartTokens;
+ dateTimeStartData = testTimezone.timezoneStandardCollection[1].dateTimeStartData;
+ dateTimeStartTokens = testTimezone.timezoneStandardCollection[1].dateTimeStartTokens;
}
- if (testTimezone.timeZoneStandardCollection.size() > 1){
+ if (testTimezone.timezoneStandardCollection.size() > 1){
- timeZoneOffsetToData = testTimezone.timeZoneStandardCollection[1].timeZoneOffsetToData;
- timeZoneOffsetToTokens = testTimezone.timeZoneStandardCollection[1].timeZoneOffsetToTokens;
+ timeZoneOffsetToData = testTimezone.timezoneStandardCollection[1].timeZoneOffsetToData;
+ timeZoneOffsetToTokens = testTimezone.timezoneStandardCollection[1].timeZoneOffsetToTokens;
}
- if (testTimezone.timeZoneStandardCollection.size() > 1){
+ if (testTimezone.timezoneStandardCollection.size() > 1){
- timeZoneOffsetFromData = testTimezone.timeZoneStandardCollection[1].timeZoneOffsetFromData;
- timeZoneOffsetFromTokens = testTimezone.timeZoneStandardCollection[1].timeZoneOffsetFromTokens;
+ timeZoneOffsetFromData = testTimezone.timezoneStandardCollection[1].timeZoneOffsetFromData;
+ timeZoneOffsetFromTokens = testTimezone.timezoneStandardCollection[1].timeZoneOffsetFromTokens;
}
timeZoneOffsetFromData.clear();
timeZoneOffsetFromTokens.clear();
- if (testTimezone.timeZoneStandardCollection.size() > 2){
+ if (testTimezone.timezoneStandardCollection.size() > 2){
- dateTimeStartData = testTimezone.timeZoneStandardCollection[2].dateTimeStartData;
- dateTimeStartTokens = testTimezone.timeZoneStandardCollection[2].dateTimeStartTokens;
+ dateTimeStartData = testTimezone.timezoneStandardCollection[2].dateTimeStartData;
+ dateTimeStartTokens = testTimezone.timezoneStandardCollection[2].dateTimeStartTokens;
}
- if (testTimezone.timeZoneStandardCollection.size() > 2){
+ if (testTimezone.timezoneStandardCollection.size() > 2){
- timeZoneOffsetToData = testTimezone.timeZoneStandardCollection[2].timeZoneOffsetToData;
- timeZoneOffsetToTokens = testTimezone.timeZoneStandardCollection[2].timeZoneOffsetToTokens;
+ timeZoneOffsetToData = testTimezone.timezoneStandardCollection[2].timeZoneOffsetToData;
+ timeZoneOffsetToTokens = testTimezone.timezoneStandardCollection[2].timeZoneOffsetToTokens;
}
- if (testTimezone.timeZoneStandardCollection.size() > 2){
+ if (testTimezone.timezoneStandardCollection.size() > 2){
- timeZoneOffsetFromData = testTimezone.timeZoneStandardCollection[2].timeZoneOffsetFromData;
- timeZoneOffsetFromTokens = testTimezone.timeZoneStandardCollection[2].timeZoneOffsetFromTokens;
+ timeZoneOffsetFromData = testTimezone.timezoneStandardCollection[2].timeZoneOffsetFromData;
+ timeZoneOffsetFromTokens = testTimezone.timezoneStandardCollection[2].timeZoneOffsetFromTokens;
}
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].commentList.size() > 0){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].commentList.size() > 0){
- commentList = testTimezone.timeZoneStandardCollection[2].commentList[0];
- commentListAltRep = testTimezone.timeZoneStandardCollection[2].commentListAltRep[0];
- commentListLanguage = testTimezone.timeZoneStandardCollection[2].commentListLanguage[0];
- commentListTokens = testTimezone.timeZoneStandardCollection[2].commentListTokens[0];
+ commentList = testTimezone.timezoneStandardCollection[2].commentList[0];
+ commentListAltRep = testTimezone.timezoneStandardCollection[2].commentListAltRep[0];
+ commentListLanguage = testTimezone.timezoneStandardCollection[2].commentListLanguage[0];
+ commentListTokens = testTimezone.timezoneStandardCollection[2].commentListTokens[0];
}
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].recurranceRuleData.size() > 0){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].recurranceRuleData.size() > 0){
- recurranceRuleData = testTimezone.timeZoneStandardCollection[2].recurranceRuleData;
- recurranceRuleDataTokens = testTimezone.timeZoneStandardCollection[2].recurranceRuleDataTokens;
+ recurranceRuleData = testTimezone.timezoneStandardCollection[2].recurranceRuleData;
+ recurranceRuleDataTokens = testTimezone.timezoneStandardCollection[2].recurranceRuleDataTokens;
}
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].recurranceDateData.size() > 0){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].recurranceDateData.size() > 0){
- recurranceDateData = testTimezone.timeZoneStandardCollection[2].recurranceDateData[0];
- recurranceDateValue = testTimezone.timeZoneStandardCollection[2].recurranceDateDataValue[0];
- recurranceDateDatatimeZoneParam = testTimezone.timeZoneStandardCollection[2].recurranceDateDatatimeZoneParam[0];
- recurranceDateDataTokens = testTimezone.timeZoneStandardCollection[2].recurranceDateDataTokens[0];
+ recurranceDateData = testTimezone.timezoneStandardCollection[2].recurranceDateData[0];
+ recurranceDateValue = testTimezone.timezoneStandardCollection[2].recurranceDateDataValue[0];
+ recurranceDateDataTimeZoneParam = testTimezone.timezoneStandardCollection[2].recurranceDateDataTimeZoneParam[0];
+ recurranceDateDataTokens = testTimezone.timezoneStandardCollection[2].recurranceDateDataTokens[0];
}
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].timeZoneNameData.size() > 0){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].timeZoneNameData.size() > 0){
- timeZoneNameData = testTimezone.timeZoneStandardCollection[2].timeZoneNameData[0];
- timeZoneNameLanguage = testTimezone.timeZoneStandardCollection[2].timeZoneNameLanguage[0];
- timeZoneNameTokens = testTimezone.timeZoneStandardCollection[2].timeZoneNameTokens[0];
+ timeZoneNameData = testTimezone.timezoneStandardCollection[2].timeZoneNameData[0];
+ timeZoneNameLanguage = testTimezone.timezoneStandardCollection[2].timeZoneNameLanguage[0];
+ timeZoneNameTokens = testTimezone.timezoneStandardCollection[2].timeZoneNameTokens[0];
}
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].xTokensData.size() > 0){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].xTokensData.size() > 0){
- xTokensData = testTimezone.timeZoneStandardCollection[2].xTokensData[0];
- xTokensDataTokens = testTimezone.timeZoneStandardCollection[2].xTokensDataTokens[0];
+ xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[0];
+ xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[0];
}
ASSERT_EQ("20160205,20160207,20160216,20160305", recurranceDateData);
ASSERT_EQ("DATE", recurranceDateValue);
- ASSERT_EQ("Europe/Truro", recurranceDateDatatimeZoneParam);
+ ASSERT_EQ("Europe/Truro", recurranceDateDataTimeZoneParam);
ASSERT_EQ("BEEP=BOOP", recurranceDateDataTokens);
ASSERT_EQ("Example Timezone Name 1", timeZoneNameData);
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].xTokensData.size() > 1){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].xTokensData.size() > 1){
- xTokensData = testTimezone.timeZoneStandardCollection[2].xTokensData[1];
- xTokensDataTokens = testTimezone.timeZoneStandardCollection[2].xTokensDataTokens[1];
+ xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[1];
+ xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[1];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].xTokensData.size() > 2){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].xTokensData.size() > 2){
- xTokensData = testTimezone.timeZoneStandardCollection[2].xTokensData[2];
- xTokensDataTokens = testTimezone.timeZoneStandardCollection[2].xTokensDataTokens[2];
+ xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[2];
+ xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[2];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].xTokensData.size() > 3){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].xTokensData.size() > 3){
- xTokensData = testTimezone.timeZoneStandardCollection[2].xTokensData[3];
- xTokensDataTokens = testTimezone.timeZoneStandardCollection[2].xTokensDataTokens[3];
+ xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[3];
+ xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[3];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].xTokensData.size() > 4){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].xTokensData.size() > 4){
- xTokensData = testTimezone.timeZoneStandardCollection[2].xTokensData[4];
- xTokensDataTokens = testTimezone.timeZoneStandardCollection[2].xTokensDataTokens[4];
+ xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[4];
+ xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[4];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].xTokensData.size() > 5){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].xTokensData.size() > 5){
- xTokensData = testTimezone.timeZoneStandardCollection[2].xTokensData[5];
- xTokensDataTokens = testTimezone.timeZoneStandardCollection[2].xTokensDataTokens[5];
+ xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[5];
+ xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[5];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].xTokensData.size() > 6){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].xTokensData.size() > 6){
- xTokensData = testTimezone.timeZoneStandardCollection[2].xTokensData[6];
- xTokensDataTokens = testTimezone.timeZoneStandardCollection[2].xTokensDataTokens[6];
+ xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[6];
+ xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[6];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].xTokensData.size() > 7){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].xTokensData.size() > 7){
- xTokensData = testTimezone.timeZoneStandardCollection[2].xTokensData[7];
- xTokensDataTokens = testTimezone.timeZoneStandardCollection[2].xTokensDataTokens[7];
+ xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[7];
+ xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[7];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneStandardCollection.size() > 2 &&
- testTimezone.timeZoneStandardCollection[2].xTokensData.size() > 8){
+ if (testTimezone.timezoneStandardCollection.size() > 2 &&
+ testTimezone.timezoneStandardCollection[2].xTokensData.size() > 8){
- xTokensData = testTimezone.timeZoneStandardCollection[2].xTokensData[8];
- xTokensDataTokens = testTimezone.timeZoneStandardCollection[2].xTokensDataTokens[8];
+ xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[8];
+ xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[8];
}
timeZoneOffsetToData.clear();
timeZoneOffsetFromData.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 0){
+ if (testTimezone.timezoneDaylightCollection.size() > 0){
- dateTimeStartData = testTimezone.timeZoneDaylightCollection[0].dateTimeStartData;
+ dateTimeStartData = testTimezone.timezoneDaylightCollection[0].dateTimeStartData;
}
- if (testTimezone.timeZoneDaylightCollection.size() > 0){
+ if (testTimezone.timezoneDaylightCollection.size() > 0){
- timeZoneOffsetToData = testTimezone.timeZoneDaylightCollection[0].timeZoneOffsetToData;
+ timeZoneOffsetToData = testTimezone.timezoneDaylightCollection[0].timeZoneOffsetToData;
}
- if (testTimezone.timeZoneDaylightCollection.size() > 0){
+ if (testTimezone.timezoneDaylightCollection.size() > 0){
- timeZoneOffsetFromData = testTimezone.timeZoneDaylightCollection[0].timeZoneOffsetFromData;
+ timeZoneOffsetFromData = testTimezone.timezoneDaylightCollection[0].timeZoneOffsetFromData;
}
recurranceDateData.clear();
recurranceDateValue.clear();
- recurranceDateDatatimeZoneParam.clear();
+ recurranceDateDataTimeZoneParam.clear();
recurranceDateDataTokens.clear();
timeZoneNameData.clear();
timeZoneOffsetToData.clear();
timeZoneOffsetFromData.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 1){
+ if (testTimezone.timezoneDaylightCollection.size() > 1){
- dateTimeStartData = testTimezone.timeZoneDaylightCollection[1].dateTimeStartData;
- dateTimeStartTokens = testTimezone.timeZoneDaylightCollection[1].dateTimeStartTokens;
+ dateTimeStartData = testTimezone.timezoneDaylightCollection[1].dateTimeStartData;
+ dateTimeStartTokens = testTimezone.timezoneDaylightCollection[1].dateTimeStartTokens;
}
- if (testTimezone.timeZoneDaylightCollection.size() > 1){
+ if (testTimezone.timezoneDaylightCollection.size() > 1){
- timeZoneOffsetToData = testTimezone.timeZoneDaylightCollection[1].timeZoneOffsetToData;
- timeZoneOffsetToTokens = testTimezone.timeZoneDaylightCollection[1].timeZoneOffsetToTokens;
+ timeZoneOffsetToData = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetToData;
+ timeZoneOffsetToTokens = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetToTokens;
}
- if (testTimezone.timeZoneDaylightCollection.size() > 1){
+ if (testTimezone.timezoneDaylightCollection.size() > 1){
- timeZoneOffsetFromData = testTimezone.timeZoneDaylightCollection[1].timeZoneOffsetFromData;
- timeZoneOffsetFromTokens = testTimezone.timeZoneDaylightCollection[1].timeZoneOffsetFromTokens;
+ timeZoneOffsetFromData = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetFromData;
+ timeZoneOffsetFromTokens = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetFromTokens;
}
timeZoneOffsetFromData.clear();
timeZoneOffsetFromTokens.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 2){
+ if (testTimezone.timezoneDaylightCollection.size() > 2){
- dateTimeStartData = testTimezone.timeZoneDaylightCollection[2].dateTimeStartData;
- dateTimeStartTokens = testTimezone.timeZoneDaylightCollection[2].dateTimeStartTokens;
+ dateTimeStartData = testTimezone.timezoneDaylightCollection[2].dateTimeStartData;
+ dateTimeStartTokens = testTimezone.timezoneDaylightCollection[2].dateTimeStartTokens;
}
- if (testTimezone.timeZoneDaylightCollection.size() > 2){
+ if (testTimezone.timezoneDaylightCollection.size() > 2){
- timeZoneOffsetToData = testTimezone.timeZoneDaylightCollection[2].timeZoneOffsetToData;
- timeZoneOffsetToTokens = testTimezone.timeZoneDaylightCollection[2].timeZoneOffsetToTokens;
+ timeZoneOffsetToData = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetToData;
+ timeZoneOffsetToTokens = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetToTokens;
}
- if (testTimezone.timeZoneDaylightCollection.size() > 2){
+ if (testTimezone.timezoneDaylightCollection.size() > 2){
- timeZoneOffsetFromData = testTimezone.timeZoneDaylightCollection[2].timeZoneOffsetFromData;
- timeZoneOffsetFromTokens = testTimezone.timeZoneDaylightCollection[2].timeZoneOffsetFromTokens;
+ timeZoneOffsetFromData = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetFromData;
+ timeZoneOffsetFromTokens = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetFromTokens;
}
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].commentList.size() > 0){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].commentList.size() > 0){
- commentList = testTimezone.timeZoneDaylightCollection[2].commentList[0];
- commentListAltRep = testTimezone.timeZoneDaylightCollection[2].commentListAltRep[0];
- commentListLanguage = testTimezone.timeZoneDaylightCollection[2].commentListLanguage[0];
- commentListTokens = testTimezone.timeZoneDaylightCollection[2].commentListTokens[0];
+ commentList = testTimezone.timezoneDaylightCollection[2].commentList[0];
+ commentListAltRep = testTimezone.timezoneDaylightCollection[2].commentListAltRep[0];
+ commentListLanguage = testTimezone.timezoneDaylightCollection[2].commentListLanguage[0];
+ commentListTokens = testTimezone.timezoneDaylightCollection[2].commentListTokens[0];
}
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].recurranceRuleData.size() > 0){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].recurranceRuleData.size() > 0){
- recurranceRuleData = testTimezone.timeZoneDaylightCollection[2].recurranceRuleData;
- recurranceRuleDataTokens = testTimezone.timeZoneDaylightCollection[2].recurranceRuleDataTokens;
+ recurranceRuleData = testTimezone.timezoneDaylightCollection[2].recurranceRuleData;
+ recurranceRuleDataTokens = testTimezone.timezoneDaylightCollection[2].recurranceRuleDataTokens;
}
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].recurranceDateData.size() > 0){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].recurranceDateData.size() > 0){
- recurranceDateData = testTimezone.timeZoneDaylightCollection[2].recurranceDateData[0];
- recurranceDateValue = testTimezone.timeZoneDaylightCollection[2].recurranceDateDataValue[0];
- recurranceDateDataTimeZoneParam = testTimezone.timeZoneDaylightCollection[2].recurranceDateDataTimeZoneParam[0];
- recurranceDateDataTokens = testTimezone.timeZoneDaylightCollection[2].recurranceDateDataTokens[0];
+ recurranceDateData = testTimezone.timezoneDaylightCollection[2].recurranceDateData[0];
+ recurranceDateValue = testTimezone.timezoneDaylightCollection[2].recurranceDateDataValue[0];
+ recurranceDateDataTimeZoneParam = testTimezone.timezoneDaylightCollection[2].recurranceDateDataTimeZoneParam[0];
+ recurranceDateDataTokens = testTimezone.timezoneDaylightCollection[2].recurranceDateDataTokens[0];
}
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].timeZoneNameData.size() > 0){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].timeZoneNameData.size() > 0){
- timeZoneNameData = testTimezone.timeZoneDaylightCollection[2].timeZoneNameData[0];
- timeZoneNameLanguage = testTimezone.timeZoneDaylightCollection[2].timeZoneNameLanguage[0];
- timeZoneNameTokens = testTimezone.timeZoneDaylightCollection[2].timeZoneNameTokens[0];
+ timeZoneNameData = testTimezone.timezoneDaylightCollection[2].timeZoneNameData[0];
+ timeZoneNameLanguage = testTimezone.timezoneDaylightCollection[2].timeZoneNameLanguage[0];
+ timeZoneNameTokens = testTimezone.timezoneDaylightCollection[2].timeZoneNameTokens[0];
}
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].xTokensData.size() > 0){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 0){
- xTokensData = testTimezone.timeZoneDaylightCollection[2].xTokensData[0];
- xTokensDataTokens = testTimezone.timeZoneDaylightCollection[2].xTokensDataTokens[0];
+ xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[0];
+ xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[0];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].xTokensData.size() > 1){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 1){
- xTokensData = testTimezone.timeZoneDaylightCollection[2].xTokensData[1];
- xTokensDataTokens = testTimezone.timeZoneDaylightCollection[2].xTokensDataTokens[1];
+ xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[1];
+ xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[1];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].xTokensData.size() > 2){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 2){
- xTokensData = testTimezone.timeZoneDaylightCollection[2].xTokensData[2];
- xTokensDataTokens = testTimezone.timeZoneDaylightCollection[2].xTokensDataTokens[2];
+ xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[2];
+ xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[2];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].xTokensData.size() > 3){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 3){
- xTokensData = testTimezone.timeZoneDaylightCollection[2].xTokensData[3];
- xTokensDataTokens = testTimezone.timeZoneDaylightCollection[2].xTokensDataTokens[3];
+ xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[3];
+ xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[3];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].xTokensData.size() > 4){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 4){
- xTokensData = testTimezone.timeZoneDaylightCollection[2].xTokensData[4];
- xTokensDataTokens = testTimezone.timeZoneDaylightCollection[2].xTokensDataTokens[4];
+ xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[4];
+ xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[4];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].xTokensData.size() > 5){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 5){
- xTokensData = testTimezone.timeZoneDaylightCollection[2].xTokensData[5];
- xTokensDataTokens = testTimezone.timeZoneDaylightCollection[2].xTokensDataTokens[5];
+ xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[5];
+ xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[5];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].xTokensData.size() > 6){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 6){
- xTokensData = testTimezone.timeZoneDaylightCollection[2].xTokensData[6];
- xTokensDataTokens = testTimezone.timeZoneDaylightCollection[2].xTokensDataTokens[6];
+ xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[6];
+ xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[6];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].xTokensData.size() > 7){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 7){
- xTokensData = testTimezone.timeZoneDaylightCollection[2].xTokensData[7];
- xTokensDataTokens = testTimezone.timeZoneDaylightCollection[2].xTokensDataTokens[7];
+ xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[7];
+ xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[7];
}
xTokensData.clear();
xTokensDataTokens.clear();
- if (testTimezone.timeZoneDaylightCollection.size() > 2 &&
- testTimezone.timeZoneDaylightCollection[2].xTokensData.size() > 8){
+ if (testTimezone.timezoneDaylightCollection.size() > 2 &&
+ testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 8){
- xTokensData = testTimezone.timeZoneDaylightCollection[2].xTokensData[8];
- xTokensDataTokens = testTimezone.timeZoneDaylightCollection[2].xTokensDataTokens[8];
+ xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[8];
+ xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[8];
}
void populatecaldav(){
- CalDAV PopulateCalDAV;
+ CalDAV populateCalDAV;
// Load the connection settings.
string calendarName = "Unit Testing Calendar";
string calendarShortName = "unittestcal";
- populateCalDAV.setupConnectionData(&ConnNormal);
+ populateCalDAV.SetupConnectionData(&connNormal);
CalDAVServerResult serverResult;
serverResult = populateCalDAV.Connect();
- if (serverResult.Code != CURLE_OK){
+ if (serverResult.code != CURLE_OK){
cout << "Error while connecting to the CalDAV server." << endl;
- cout << "Xestia Calendar Code: " << ServerResult.Result << endl;
- cout << "cURL Code: " << ServerResult.Code << endl;
- cout << "HTTP Code: " << ServerResult.HTTPCode << endl;
+ cout << "Xestia Calendar Code: " << serverResult.result << endl;
+ cout << "cURL Code: " << serverResult.code << endl;
+ cout << "HTTP Code: " << serverResult.httpCode << endl;
return;
}
// Look for the Unit testing calendar.
for (std::map<int,string>::iterator calNameIter = calendarList.name.begin();
- calNameIter != calendarList.Name.end(); calNameIter++){
+ calNameIter != calendarList.name.end(); calNameIter++){
if (calNameIter->second == "Unit Testing Calendar"){
calendarURI = calendarList.href.find(calNameIter->first)->second;
// Delete the previous calendar.
- serverResult = PopulateCalDAV.DeleteCalendar(&calendarURI);
+ serverResult = populateCalDAV.DeleteCalendar(&calendarURI);
if (serverResult.code != CURLE_OK){
serverResult = populateCalDAV.AddCalendar(&calendarName, &calendarShortName);
- if (serverResult.Code != CURLE_OK){
+ if (serverResult.code != CURLE_OK){
cout << "Error while adding a calendar." << endl;
cout << "Xestia Calendar Code: " << serverResult.result << endl;
// Look for the Unit testing calendar.
for (std::map<int,string>::iterator calNameIter = calendarList.name.begin();
- calNameIter != calendarList.Name.end(); calNameIter++){
+ calNameIter != calendarList.name.end(); calNameIter++){
if (calNameIter->second == "Unit Testing Calendar"){
calendarURI = calendarList.href.find(calNameIter->first)->second;
calendarEntryURI = calendarURI;
calendarEntryURI += entryFilename[entrySeek];
- serverResult = PopulateCalDAV.AddEntry(&calendarEntryURI, &entryData[entrySeek]);
+ serverResult = populateCalDAV.AddEntry(&calendarEntryURI, &entryData[entrySeek]);
if (serverResult.code != CURLE_OK){
// Find which option has been selected from the
// input.
- switch(IntOption){
+ switch(intOption){
case TESTS_ICALLOADEVENT:
printn("Running iCalendar Event Component tests...");
#include "xestiacalendar_testcommon.h"
#include "../common/file.h"
-ProcessConnectionDataFileResult ProcessConnectionDataFile(string DataFilename,
- CalDAVConnectionData *ConnData){
+ProcessConnectionDataFileResult ProcessConnectionDataFile(string dataFilename,
+ CalDAVConnectionData *connData){
ProcessConnectionDataFileResult processResult = PROCESSCONNECTIONDATAFILE_UNITTESTFAIL;
char *bufferRead = new char[256];
- while (!FileStream.eof()){
+ while (!fileStream.eof()){
fileStream.getline(bufferRead, 256);
receivedStringData.append(bufferRead);
// CalDAVConnectionData handle.
if (portNumValid == true){
- connData->Port = portNum;
+ connData->port = portNum;
serverPortFound = true;
}
// Setup the server pass.
- connData->Password = propertyValue;
+ connData->password = propertyValue;
serverPassFound = true;
} else if (propertyName == "ssl" && serverSSLFound == false){
eventListFrame->SetScrollRate(0,1);
//EventListFrameSizer->FitInside(EventListFrame);
- eventListFrameSizer->Fit(EventListFrame);
+ eventListFrameSizer->Fit(eventListFrame);
eventListFrameSizer->Layout();
windowSizer->Fit(this);
}
-void XCCalendarDay::DeselectAllEvent(wxCommandEvent &DeselectEvent)
+void XCCalendarDay::DeselectAllEvent(wxCommandEvent &deselectEvent)
{
int selectedEntryID = deselectEvent.GetInt();
deselectEntryEvent.SetId(ID_ENTRYDESELECT);
for (vector<XCCalendarDayEntry*>::iterator entryIter = calendarEntryList.begin();
- entryIter != calendarEntryList.end(); EntryIter++){
+ entryIter != calendarEntryList.end(); entryIter++){
wxPostEvent((*entryIter), deselectEntryEvent);
}
- wxSizerItem *calendarItem = EventListFrameSizer->GetItem((*calendarEntryIter));
+ wxSizerItem *calendarItem = eventListFrameSizer->GetItem((*calendarEntryIter));
(*calendarEntryIter)->Show(true);
// Get the spacing and hide it as well.
if ((*calendarEntryIter)->GetEventID() == eventData.GetInt()){
- wxSizerItem *calendarItem = EventListFrameSizer->GetItem((*calendarEntryIter));
+ wxSizerItem *calendarItem = eventListFrameSizer->GetItem((*calendarEntryIter));
(*calendarEntryIter)->Show(false);
// Get the spacing and hide it as well.
}
-void XCCalendarDayEntry::SetColour(Colour *ColourIn){
+void XCCalendarDayEntry::SetColour(Colour *colourIn){
entryColour = *colourIn;
Repaint();
}
-void XCCalendarDayEntry::SetDisplayAlarm(bool DisplayValue){
+void XCCalendarDayEntry::SetDisplayAlarm(bool displayValue){
hasAlarm = displayValue;
UpdateInformation();
}
-void XCCalendarDayEntry::SetDisplayHighPriority(bool DisplayValue){
+void XCCalendarDayEntry::SetDisplayHighPriority(bool displayValue){
hasHighPriority = displayValue;
UpdateInformation();
test.SetWeight(wxFONTWEIGHT_BOLD);
test.SetPointSize(18);
- dateButton->SetFont(Test);
+ dateButton->SetFont(test);
dateButton->SetForegroundColour(wxColour(255,255,255));
// Setup the event controls.
// Append a menu item to the XCCalendarMenu control.
- wxMenuItem *menuitem = this->Append(ItemID, menuName, menuDescription);
+ wxMenuItem *menuitem = this->Append(itemID, menuName, menuDescription);
this->Connect(menuitem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(XCCalendarMenu::ProcessMenuItemClick));
menuItems.insert(std::make_pair(objectName.ToStdString(), menuitem));
int itemID = event.GetId();
- PopupPtr->Dismiss();
+ popupPtr->Dismiss();
switch (itemID){
wxCommandEvent editCalendar(XCMAIN_EDITCALENDAR);
editCalendar.SetId(ID_EDITCALENDAR);
editCalendar.SetInt(calendarID);
- wxPostEvent(WindowPtr->GetParent()->GetParent()->GetParent()->GetParent(), editCalendar);
+ wxPostEvent(windowPtr->GetParent()->GetParent()->GetParent()->GetParent(), editCalendar);
}
break;
case ID_CALENDARMENU_DELETE:
wxCommandEvent deleteCalendar(XCMAIN_DELETECALENDAR);
deleteCalendar.SetId(ID_DELETECALENDAR);
deleteCalendar.SetClientData(calendarInfo);
- wxPostEvent(WindowPtr->GetParent()->GetParent()->GetParent()->GetParent(), deleteCalendar);
+ wxPostEvent(windowPtr->GetParent()->GetParent()->GetParent()->GetParent(), deleteCalendar);
}
break;
void XCCalendarMenu::SetWindowPointer(wxWindow *windowPointer){
- WindowPtr = windowPointer;
+ windowPtr = windowPointer;
}
void XCCalendarMenu::SetPopupPointer(wxPopupTransientWindow *popupPointer){
- PopupPtr = popupPointer;
+ popupPtr = popupPointer;
}
\ No newline at end of file
eventMenu = new XCEventMenu;
- WindowSizer->Add(mondayText, 1, wxEXPAND|wxALL, 0);
- WindowSizer->Add(tuesdayText, 1, wxEXPAND|wxALL, 0);
- WindowSizer->Add(wednesdayText, 1, wxEXPAND|wxALL, 0);
- WindowSizer->Add(thursdayText, 1, wxEXPAND|wxALL, 0);
- WindowSizer->Add(fridayText, 1, wxEXPAND|wxALL, 0);
- WindowSizer->Add(saturdayText, 1, wxEXPAND|wxALL, 0);
- WindowSizer->Add(sundayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(mondayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(tuesdayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(wednesdayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(thursdayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(fridayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(saturdayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(sundayText, 1, wxEXPAND|wxALL, 0);
ProcessGrid(grid, hideAccounts, hideCalendars);
saturdayText = new XCCalendarMonthViewDayTitle(this, _("Saturday"), wxDefaultPosition, wxDefaultSize);
sundayText = new XCCalendarMonthViewDayTitle(this, _("Sunday"), wxDefaultPosition, wxDefaultSize);
- windowSizer->Add(MondayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(TuesdayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(WednesdayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(ThursdayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(FridayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(SaturdayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(SundayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(mondayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(tuesdayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(wednesdayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(thursdayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(fridayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(saturdayText, 1, wxEXPAND|wxALL, 0);
+ windowSizer->Add(sundayText, 1, wxEXPAND|wxALL, 0);
ProcessGrid(grid, hideAccounts, hideCalendars);
week++;
for (vector<XCCalendarMonthViewGridDayData>::iterator dayIter = (*weekIter).dayList.begin();
- dayIter != (*weekIter).dayList.end(); DayIter++){
+ dayIter != (*weekIter).dayList.end(); dayIter++){
// Add Calendar entries.
}
-void XCCalendarMonthView::DeselectOthersEvent(wxCommandEvent &DeselectEvent){
+void XCCalendarMonthView::DeselectOthersEvent(wxCommandEvent &deselectEvent){
for (vector<XCCalendarDay*>::iterator dayIter = calendarDayList.begin();
- dayIter != calendarDayList.end(); DayIter++){
+ dayIter != calendarDayList.end(); dayIter++){
if (deselectEvent.GetClientData() != (void*)(*dayIter)){
wxCommandEvent editEntry(XCMAIN_EDITEVENT);
editEntry.SetId(ID_EDITEVENT);
editEntry.SetInt(eventID);
- wxPostEvent(WindowPtr, editEntry);
+ wxPostEvent(windowPtr, editEntry);
}
break;
case ID_EVENTMENU_DELETE:
wxCommandEvent deleteEvent(XCMAIN_DELETEEVENT);
deleteEvent.SetId(ID_DELETEEVENT);
deleteEvent.SetClientData(eventInfo);
- wxPostEvent(WindowPtr, deleteEvent);
+ wxPostEvent(windowPtr, deleteEvent);
}
break;