From 1fe6e43892e5c572949a293a9e19704b5debadad Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Tue, 31 Jan 2017 00:38:36 +0000 Subject: [PATCH] camelCase: Converted remaining code that was missed --- source/common/monthviewgen.cpp | 20 +- source/common/preferences.cpp | 22 +- source/common/text.cpp | 16 +- source/forms/editaccount/frmEditAccount.cpp | 2 +- source/forms/eventeditor/frmEventEditor.cpp | 18 +- source/forms/newaccount/frmNewAccount.cpp | 14 +- source/forms/preferences/frmPreferences.cpp | 4 +- source/forms/update/frmUpdate.cpp | 4 +- .../CalendarDataStorage.cpp | 88 ++--- .../objects/CalDAV/CalDAV-XMLProcessing.cpp | 10 +- source/objects/CalDAV/CalDAV.cpp | 57 ++- .../calendarevent/CalendarEvent-Save.cpp | 12 +- .../objects/calendarevent/CalendarEvent.cpp | 76 ++-- .../CalendarFreeBusy-Save.cpp | 14 +- .../calendarfreebusy/CalendarFreeBusy.cpp | 4 +- .../calendarjournal/CalendarJournal-Save.cpp | 12 +- .../calendarjournal/CalendarJournal.cpp | 12 +- .../objects/calendarobject/CalendarObject.cpp | 10 +- .../calendartask/CalendarTask-Save.cpp | 100 +++--- source/objects/calendartask/CalendarTask.cpp | 20 +- .../CalendarTimezone-Save.cpp | 4 +- .../calendartimezone/CalendarTimezone.cpp | 6 +- source/tests/xestiacalendar_caldav.h | 116 +++--- source/tests/xestiacalendar_commonfunctions.h | 6 +- source/tests/xestiacalendar_icaleventload.h | 54 +-- .../tests/xestiacalendar_icalfreebusyload.h | 30 +- source/tests/xestiacalendar_icaljournalload.h | 24 +- source/tests/xestiacalendar_icaltaskload.h | 204 +++++------ .../tests/xestiacalendar_icaltimezoneload.h | 330 +++++++++--------- source/tests/xestiacalendar_populate.cpp | 22 +- source/tests/xestiacalendar_test.cpp | 2 +- source/tests/xestiacalendar_testcommon.cpp | 10 +- source/widgets/XCCalendarDay.cpp | 10 +- source/widgets/XCCalendarDayEntry.cpp | 6 +- source/widgets/XCCalendarManipulator.cpp | 2 +- source/widgets/XCCalendarMenu.cpp | 12 +- source/widgets/XCCalendarMonthView.cpp | 34 +- source/widgets/XCEventMenu.cpp | 4 +- 38 files changed, 708 insertions(+), 683 deletions(-) diff --git a/source/common/monthviewgen.cpp b/source/common/monthviewgen.cpp index df23527..3455400 100644 --- a/source/common/monthviewgen.cpp +++ b/source/common/monthviewgen.cpp @@ -72,7 +72,7 @@ int PreviousMonthNumberofDays(int month, int year){ XCCalendarMonthViewGrid GenerateMonthGrid(int month, int year){ - XCCalendarMonthViewGrid MonthViewOutput; + XCCalendarMonthViewGrid monthViewOutput; // Work out which day of the week the first day of // the month is. @@ -82,7 +82,7 @@ XCCalendarMonthViewGrid GenerateMonthGrid(int month, int year){ 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; @@ -124,10 +124,10 @@ XCCalendarMonthViewGrid GenerateMonthGrid(int month, int year){ 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); @@ -165,10 +165,10 @@ XCCalendarMonthViewGrid GenerateMonthGrid(int month, int year){ 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){ diff --git a/source/common/preferences.cpp b/source/common/preferences.cpp index f43b48b..b108baf 100644 --- a/source/common/preferences.cpp +++ b/source/common/preferences.cpp @@ -79,10 +79,10 @@ XCALPreferences::XCALPreferences(wxString preferencesFilename){ 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){ @@ -129,7 +129,7 @@ XCALPreferences::XCALPreferences(wxString preferencesFilename){ long itemIndex = 0; bool continueAcc = TRUE; - continueAcc = cfgFile->GetFirstGroup(accountname, itemIndex); + continueAcc = cfgFile->GetFirstGroup(accountName, itemIndex); while (continueAcc){ @@ -164,8 +164,8 @@ XCALPreferences::XCALPreferences(wxString preferencesFilename){ 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; } @@ -191,7 +191,7 @@ XCALPreferences::XCALPreferences(wxString preferencesFilename){ accountPortValid = TRUE; } - accounts.AddAccount(accountname, wxT("CalDAV"), accAdr, accPort, + accounts.AddAccount(accountName, wxT("CalDAV"), accAdr, accPort, accSSL, accUsr, accPass, accPrefix, accDir, accRef); @@ -255,7 +255,7 @@ XCALPreferences::XCALPreferences(wxString preferencesFilename){ preAccountStage = TRUE; cfgFile->SetPath(wxT("/")); - ContinueAcc = cfgfile->GetNextGroup(accountName, itemIndex); + continueAcc = cfgFile->GetNextGroup(accountName, itemIndex); } @@ -288,7 +288,7 @@ void XCALPreferences::SetMainWindowData(wxRect windowData){ // Set the main window data from a wxRect object. - mainWindowData = WindowData; + mainWindowData = windowData; } @@ -298,7 +298,7 @@ XCALPrefAccounts::XCALPrefAccounts(){ // Setup the default values for XCALPrefAccounts. - AccountsCount = 0; + accountsCount = 0; } diff --git a/source/common/text.cpp b/source/common/text.cpp index 4581e38..5ef23f1 100644 --- a/source/common/text.cpp +++ b/source/common/text.cpp @@ -20,7 +20,7 @@ using namespace std; -multimap ProcessTextVectors(vector *TextProperties, +multimap ProcessTextVectors(vector *textProperties, vector *textValues, bool searchMultiple, string property){ @@ -60,7 +60,7 @@ multimap ProcessTextVectors(vector *TextProperties, break; } - PropertyName += bufferChar; + propertyName += bufferChar; textSeekCount++; @@ -169,7 +169,7 @@ PropertyNameValue SplitNameValue(string inputData){ 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){ @@ -186,7 +186,7 @@ PropertyNameValue SplitNameValue(string inputData){ if (dataFound == false){ - finalNameValue.Name = inputData; + finalNameValue.name = inputData; } @@ -316,11 +316,11 @@ void SplitPathFilename(string *calendarEntryHREF, string *entryURIPath, // 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)); } @@ -332,7 +332,7 @@ string OutputText(string *textInput){ int lineSeek = 0; int maxLineSeek = 77; - for (charSeek = 0; charSeek < TextInput->size(); charSeek++){ + for (charSeek = 0; charSeek < textInput->size(); charSeek++){ lineSeek++; @@ -342,7 +342,7 @@ string OutputText(string *textInput){ outputLine += textInput->substr(charSeek, 1); } outputLine += "\n"; - outputTextData += OutputLine; + outputTextData += outputLine; outputLine = " "; lineSeek = 0; maxLineSeek = 76; diff --git a/source/forms/editaccount/frmEditAccount.cpp b/source/forms/editaccount/frmEditAccount.cpp index f667918..58bea13 100644 --- a/source/forms/editaccount/frmEditAccount.cpp +++ b/source/forms/editaccount/frmEditAccount.cpp @@ -50,7 +50,7 @@ void frmEditAccount::UpdateSettings( wxCommandEvent& event ) // Update the settings for the account. - long itemindex = 0; + long itemIndex = 0; bool continueAcc = TRUE; wxString accountName; diff --git a/source/forms/eventeditor/frmEventEditor.cpp b/source/forms/eventeditor/frmEventEditor.cpp index f262d6a..79f5831 100644 --- a/source/forms/eventeditor/frmEventEditor.cpp +++ b/source/forms/eventeditor/frmEventEditor.cpp @@ -206,11 +206,11 @@ void frmEventEditor::SaveContact(){ // 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; @@ -222,8 +222,8 @@ void frmEventEditor::SaveContact(){ 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(""); @@ -235,7 +235,7 @@ void frmEventEditor::SaveContact(){ stringData << txtEndTime->GetValue().ToStdString().substr(3, 2).c_str(); stringData << "00Z"; - eventData.DateTimeEndData = stringData.str(); + eventData.dateTimeEndData = stringData.str(); // TODO: Implement Duration. @@ -264,7 +264,7 @@ void frmEventEditor::SaveContact(){ eventFile += NewUUID; eventFile += ".ics"; - eventData.UniqueID = NewUUID; + eventData.uniqueID = NewUUID; // Write the file. diff --git a/source/forms/newaccount/frmNewAccount.cpp b/source/forms/newaccount/frmNewAccount.cpp index e3823db..5b94c5e 100644 --- a/source/forms/newaccount/frmNewAccount.cpp +++ b/source/forms/newaccount/frmNewAccount.cpp @@ -144,7 +144,7 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) if (directoryCreated == TRUE){ - WriteAccountDetails(cfgfile, wxT("Local"), directoryName); + WriteAccountDetails(cfgFile, wxT("Local"), directoryName); } else { @@ -177,7 +177,7 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) wxString accountName; long itemIndex = 0; bool continueAcc; - continueAcc = cfgfile->GetFirstGroup(accountName, itemIndex); + continueAcc = cfgFile->GetFirstGroup(accountName, itemIndex); while (continueAcc){ @@ -189,7 +189,7 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) } cfgFile->SetPath(wxT("/")); - continueAcc = cfgfile->GetNextGroup(accountName, itemIndex); + continueAcc = cfgFile->GetNextGroup(accountName, itemIndex); } @@ -199,7 +199,7 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) 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; @@ -207,7 +207,7 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) if (directoryCreated == TRUE){ - WriteAccountDetails(cfgfile, wxT("Local"), directoryName); + WriteAccountDetails(cfgFile, wxT("Local"), directoryName); } else { @@ -218,8 +218,8 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) } - delete cfgfile; - cfgfile = NULL; + delete cfgFile; + cfgFile = NULL; *reloadAccountConfig = true; diff --git a/source/forms/preferences/frmPreferences.cpp b/source/forms/preferences/frmPreferences.cpp index b7c629b..c100296 100644 --- a/source/forms/preferences/frmPreferences.cpp +++ b/source/forms/preferences/frmPreferences.cpp @@ -208,8 +208,8 @@ void frmPreferences::ModifyAccount( wxCommandEvent& event ) 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; diff --git a/source/forms/update/frmUpdate.cpp b/source/forms/update/frmUpdate.cpp index bb46cd1..98e8f0e 100644 --- a/source/forms/update/frmUpdate.cpp +++ b/source/forms/update/frmUpdate.cpp @@ -26,7 +26,7 @@ size_t WritebackFuncUpdate(char *ptr, size_t size, size_t nmemb, wxString *strea //wxString *PageInput; data = wxString::FromUTF8((char *)ptr); - stream->Append(Data); + stream->Append(data); return size * nmemb; @@ -125,7 +125,7 @@ void frmUpdate::FetchData() // Set a message. - if (BuildType == wxT("source")){ + if (buildType == wxT("source")){ // Write message about getting the update // from Xestia Gelforn. diff --git a/source/libraries/CalendarDataStorage/CalendarDataStorage.cpp b/source/libraries/CalendarDataStorage/CalendarDataStorage.cpp index 831f725..4a690b2 100644 --- a/source/libraries/CalendarDataStorage/CalendarDataStorage.cpp +++ b/source/libraries/CalendarDataStorage/CalendarDataStorage.cpp @@ -974,14 +974,14 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file // 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)){ @@ -994,7 +994,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DateTimeStartData.substr(4,2); + eventString = eventData.dateTimeStartData.substr(4,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1007,7 +1007,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DateTimeStartData.substr(6,2); + eventString = eventData.dateTimeStartData.substr(6,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1020,7 +1020,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DateTimeStartData.substr(9,2); + eventString = eventData.dateTimeStartData.substr(9,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1033,7 +1033,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DateTimeStartData.substr(11,2); + eventString = eventData.dateTimeStartData.substr(11,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1046,7 +1046,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DateTimeStartData.substr(13,2); + eventString = eventData.dateTimeStartData.substr(13,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1071,16 +1071,16 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file 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)){ @@ -1093,7 +1093,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DateTimeEndData.substr(4,2); + eventString = eventData.dateTimeEndData.substr(4,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1106,7 +1106,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DateTimeEndData.substr(6,2); + eventString = eventData.dateTimeEndData.substr(6,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1119,7 +1119,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DateTimeEndData.substr(9,2); + eventString = eventData.dateTimeEndData.substr(9,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1132,7 +1132,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DateTimeEndData.substr(11,2); + eventString = eventData.dateTimeEndData.substr(11,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1145,7 +1145,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DateTimeEndData.substr(13,2); + eventString = eventData.dateTimeEndData.substr(13,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1160,7 +1160,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file } - eventString = eventData.DurationData; + eventString = eventData.durationData; // Process the duration data. @@ -1172,22 +1172,22 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file // 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. @@ -1256,7 +1256,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file // 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; @@ -1268,7 +1268,7 @@ CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file string eventDescription; try { - eventDescription = eventData.DescriptionList.at(0); + eventDescription = eventData.descriptionList.at(0); } catch (out_of_range &err){ @@ -1505,14 +1505,14 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil // 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)){ @@ -1525,7 +1525,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DateTimeStartData.substr(4,2); + eventString = eventData.dateTimeStartData.substr(4,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1538,7 +1538,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DateTimeStartData.substr(6,2); + eventString = eventData.dateTimeStartData.substr(6,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1551,7 +1551,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DateTimeStartData.substr(9,2); + eventString = eventData.dateTimeStartData.substr(9,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1564,7 +1564,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DateTimeStartData.substr(11,2); + eventString = eventData.dateTimeStartData.substr(11,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1577,7 +1577,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DateTimeStartData.substr(13,2); + eventString = eventData.dateTimeStartData.substr(13,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1602,16 +1602,16 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil 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)){ @@ -1624,7 +1624,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DateTimeEndData.substr(4,2); + eventString = eventData.dateTimeEndData.substr(4,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1637,7 +1637,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DateTimeEndData.substr(6,2); + eventString = eventData.dateTimeEndData.substr(6,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1650,7 +1650,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DateTimeEndData.substr(9,2); + eventString = eventData.dateTimeEndData.substr(9,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1663,7 +1663,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DateTimeEndData.substr(11,2); + eventString = eventData.dateTimeEndData.substr(11,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1676,7 +1676,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DateTimeEndData.substr(13,2); + eventString = eventData.dateTimeEndData.substr(13,2); if (all_of(eventString.begin(), eventString.end(), ::isdigit)){ @@ -1691,7 +1691,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil } - eventString = eventData.DurationData; + eventString = eventData.durationData; // Process the duration data. @@ -1703,22 +1703,22 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil // 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. @@ -1785,7 +1785,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil // 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; @@ -1797,7 +1797,7 @@ CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil string eventDescription; try { - eventDescription = eventData.DescriptionList.at(0); + eventDescription = eventData.descriptionList.at(0); } catch (out_of_range &err){ diff --git a/source/objects/CalDAV/CalDAV-XMLProcessing.cpp b/source/objects/CalDAV/CalDAV-XMLProcessing.cpp index 042750d..ab0549b 100644 --- a/source/objects/CalDAV/CalDAV-XMLProcessing.cpp +++ b/source/objects/CalDAV/CalDAV-XMLProcessing.cpp @@ -152,7 +152,7 @@ string CalDAV::ProcessXMLCalendarHome(){ // Get the data from href. - CalendarHomeURI = FetchXMLData(&nodeSeek); + calendarHomeURI = FetchXMLData(&nodeSeek); xmlFreeDoc(xmlCalDAVDoc); @@ -178,7 +178,7 @@ CalDAVCalendarList CalDAV::ProcessXMLCalendarList(){ for (nodeSeek = xmlCalDAVDoc->children; nodeSeek != NULL; - nodeSeek = NodeSeek->next) + nodeSeek = nodeSeek->next) { if (!xmlStrcmp(nodeSeek->name, (const xmlChar *)"multistatus") || @@ -483,7 +483,7 @@ CalDAVEntryList CalDAV::ProcessXMLEntryList(){ for (nodeSeek = xmlCalDAVDoc->children; nodeSeek != NULL; - nodeSeek = NodeSeek->next) + nodeSeek = nodeSeek->next) { if (!xmlStrcmp(nodeSeek->name, (const xmlChar *)"multistatus") || @@ -703,8 +703,8 @@ bool CalDAV::MatchXMLName(xmlNodePtr *nodePtrOriginal, string nodeName){ } - string nodeNameSmallD = "d:" + NodeName; - string nodeNameLargeD = "D:" + NodeName; + string nodeNameSmallD = "d:" + nodeName; + string nodeNameLargeD = "D:" + nodeName; xmlNodePtr *nodePtr = nodePtrOriginal; diff --git a/source/objects/CalDAV/CalDAV.cpp b/source/objects/CalDAV/CalDAV.cpp index 6739d48..ecd91bd 100644 --- a/source/objects/CalDAV/CalDAV.cpp +++ b/source/objects/CalDAV/CalDAV.cpp @@ -31,7 +31,7 @@ size_t CalDAVReceive(char *receivedBuffer, size_t size, size_t newMemoryBytes, s 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){ @@ -116,16 +116,16 @@ CalDAVServerResult CalDAV::Connect(){ // 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); @@ -329,7 +329,7 @@ string CalDAV::GetUserPrincipal(){ 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. @@ -341,12 +341,12 @@ string CalDAV::GetUserPrincipal(){ // 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){ @@ -403,7 +403,7 @@ string CalDAV::GetCalendarHome(string userPrincipalURI){ 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. @@ -498,7 +498,7 @@ CalDAVCalendarList CalDAV::GetCalendars(){ 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. @@ -517,7 +517,7 @@ CalDAVCalendarList CalDAV::GetCalendars(){ connectionServerResult.code = serverResult; curl_easy_getinfo(connectionHandle, CURLINFO_RESPONSE_CODE, &connectionServerResult.httpCode); - if (cerverResult != CURLE_OK){ + if (serverResult != CURLE_OK){ return serverList; @@ -605,7 +605,7 @@ CalDAVEntryList CalDAV::GetEntryList(string *calendarHREF){ 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. @@ -699,7 +699,7 @@ CalDAVEntryList CalDAV::GetEntryList(string *calendarHREF, string *calendarTag){ 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. @@ -776,7 +776,7 @@ CalDAVEntryList CalDAV::GetEntryList(string *calendarHREF, string *calendarTag){ 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. @@ -846,7 +846,7 @@ CalDAVServerResult CalDAV::AddCalendar(string *calendarName, string *calendarSho if (userPrincipalURI.size() == 0){ - return ServerResult; + return serverResult; } @@ -903,7 +903,7 @@ CalDAVServerResult CalDAV::AddCalendar(string *calendarName, string *calendarSho 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. @@ -1031,7 +1031,7 @@ CalDAVServerResult CalDAV::EditCalendarProcess(string *calendarHREF, 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. @@ -1040,7 +1040,7 @@ CalDAVServerResult CalDAV::EditCalendarProcess(string *calendarHREF, CURLcode serverConnectionResult = curl_easy_perform(connectionHandle); - if (serverConnectionRsult == CURLE_OK){ + if (serverConnectionResult == CURLE_OK){ serverResult.result = CALDAVQUERYRESULT_OK; } else { serverResult.result = CALDAVQUERYRESULT_SERVERERROR; @@ -1057,7 +1057,7 @@ CalDAVServerResult CalDAV::EditCalendarProcess(string *calendarHREF, curl_easy_setopt(connectionHandle, CURLOPT_READDATA, NULL); curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, NULL); - return ServerResult; + return serverResult; } @@ -1079,9 +1079,8 @@ CalDAVServerResult CalDAV::EditCalendar(string *calendarHREF, } -CalDAVServerResult CalDAV::EditCalendar(string *CalendarHREF, - Colour *CalendarColour){ - +CalDAVServerResult CalDAV::EditCalendar(string *calendarHREF, + Colour *calendarColour){ CalDAVServerResult serverResult; @@ -1187,9 +1186,9 @@ CalDAVServerResult CalDAV::DeleteCalendar(string *calendarHREF){ 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); @@ -1264,7 +1263,7 @@ CalDAVServerResult CalDAV::GetEntryETag(string *calendarEntryHREF, string *eTagV 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. @@ -1326,7 +1325,7 @@ CalDAVServerResult CalDAV::AddEntry(string *calendarEntryHREF, string *entryData 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. @@ -1387,7 +1386,7 @@ CalDAVServerResult CalDAV::EditEntry(string *calendarEntryHREF, string *entryDat 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. diff --git a/source/objects/calendarevent/CalendarEvent-Save.cpp b/source/objects/calendarevent/CalendarEvent-Save.cpp index b78717e..bb45415 100644 --- a/source/objects/calendarevent/CalendarEvent-Save.cpp +++ b/source/objects/calendarevent/CalendarEvent-Save.cpp @@ -516,7 +516,7 @@ void CalendarEventObject::SaveObjectData(string *saveData){ if (statusLanguage.size() > 0){ dataLine += ";LANGUAGE="; - dataLine += StatusLanguage; + dataLine += statusLanguage; } @@ -721,7 +721,7 @@ void CalendarEventObject::SaveObjectData(string *saveData){ } - if (attachListTokens[AttachListSeek].size() > 0){ + if (attachListTokens[attachListSeek].size() > 0){ dataLine += ";"; dataLine += attachListTokens[attachListSeek]; @@ -1236,10 +1236,10 @@ void CalendarEventObject::SaveObjectData(string *saveData){ dataLine += "TRIGGER"; - if (calendarAlarmData[CalendarAlarmDataSeek].triggerRelated.size() > 0){ + if (calendarAlarmData[calendarAlarmDataSeek].triggerRelated.size() > 0){ dataLine += ";RELATED="; - dataLine += calendarAlarmData[CalendarAlarmDataSeek].triggerRelated; + dataLine += calendarAlarmData[calendarAlarmDataSeek].triggerRelated; } @@ -1253,7 +1253,7 @@ void CalendarEventObject::SaveObjectData(string *saveData){ if (calendarAlarmData[calendarAlarmDataSeek].triggerTokens.size() > 0){ dataLine += ";"; - dataLine += calendarAlarmData[calendarAlarmDataSeek].TriggerTokens; + dataLine += calendarAlarmData[calendarAlarmDataSeek].triggerTokens; } @@ -1279,7 +1279,7 @@ void CalendarEventObject::SaveObjectData(string *saveData){ if (calendarAlarmData[calendarAlarmDataSeek].durationTokens.size() > 0){ dataLine += ";"; - dataLine += calendarAlarmData[CalendarAlarmDataSeek].durationTokens; + dataLine += calendarAlarmData[calendarAlarmDataSeek].durationTokens; } diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index 1ca0345..339012a 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -158,8 +158,8 @@ CalendarObjectValidResult CalendarEventObject::ValidObject(){ for (vector::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; @@ -418,7 +418,7 @@ void CalendarEventObject::ProcessData(){ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "LOCATION"); - if (DataReceived.begin() != DataReceived.end()){ + if (dataReceived.begin() != dataReceived.end()){ bool tokenData = false; string propertyTokens; @@ -514,7 +514,7 @@ void CalendarEventObject::ProcessData(){ if (propertyTokens.size() > 0){ - organiserDataTokens = PropertyTokens; + organiserDataTokens = propertyTokens; } @@ -612,7 +612,7 @@ void CalendarEventObject::ProcessData(){ } - statusData = DataReceived.begin()->second; + statusData = dataReceived.begin()->second; } @@ -833,10 +833,36 @@ void CalendarEventObject::ProcessData(){ 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::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; + } + } } @@ -959,7 +985,7 @@ void CalendarEventObject::ProcessData(){ } else if (dataiter->first == "DELEGATED-TO"){ - AttendeeListDelegatedTo[ObjectSeekCount] = dataiter->second; + attendeeListDelegatedTo[objectSeekCount] = dataiter->second; } else if (dataiter->first == "DELEGATED-FROM"){ @@ -1309,40 +1335,40 @@ void CalendarEventObject::ProcessData(){ bool tokenData = false; string propertyTokens; - PropertyNameData = (string*)&iter->first; + propertyNameData = (string*)&iter->first; - PropertyData = SplitValues(*PropertyNameData); + propertyData = SplitValues(*propertyNameData); - for(map::iterator dataiter = PropertyData.begin(); - dataiter != PropertyData.end(); dataiter++){ + for(map::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++; } @@ -1821,7 +1847,7 @@ void CalendarEventObject::ProcessData(){ } if (propertyTokens.size() > 0){ - newAlarmData.attendeeListTokens[objectSeekCount] = PropertyTokens; + newAlarmData.attendeeListTokens[objectSeekCount] = propertyTokens; } newAlarmData.attendeeList[objectSeekCount] = iter->second; @@ -1907,8 +1933,8 @@ void CalendarEventObject::ProcessData(){ 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]); } diff --git a/source/objects/calendarfreebusy/CalendarFreeBusy-Save.cpp b/source/objects/calendarfreebusy/CalendarFreeBusy-Save.cpp index 4d0fa73..74fb5bd 100644 --- a/source/objects/calendarfreebusy/CalendarFreeBusy-Save.cpp +++ b/source/objects/calendarfreebusy/CalendarFreeBusy-Save.cpp @@ -389,16 +389,16 @@ void CalendarFreeBusyObject::SaveObjectData(string *saveData){ } - 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(); } diff --git a/source/objects/calendarfreebusy/CalendarFreeBusy.cpp b/source/objects/calendarfreebusy/CalendarFreeBusy.cpp index 8a21cfb..d59149d 100644 --- a/source/objects/calendarfreebusy/CalendarFreeBusy.cpp +++ b/source/objects/calendarfreebusy/CalendarFreeBusy.cpp @@ -95,7 +95,7 @@ CalendarObjectValidResult CalendarFreeBusyObject::ValidObject(){ iter != objectName.end(); iter++){ try{ - PropertyName = objectName[seekCount].substr(0,3); + propertyName = objectName[seekCount].substr(0,3); } catch(const out_of_range& oor){ @@ -677,7 +677,7 @@ void CalendarFreeBusyObject::ProcessData(){ propertyNameData = (string*)&iter->first; - propertyData = SplitValues(propertyNameData); + propertyData = SplitValues(*propertyNameData); for(map::iterator dataiter = propertyData.begin(); dataiter != propertyData.end(); dataiter++){ diff --git a/source/objects/calendarjournal/CalendarJournal-Save.cpp b/source/objects/calendarjournal/CalendarJournal-Save.cpp index edcdd47..278e5d5 100644 --- a/source/objects/calendarjournal/CalendarJournal-Save.cpp +++ b/source/objects/calendarjournal/CalendarJournal-Save.cpp @@ -43,7 +43,7 @@ void CalendarJournalObject::SaveObjectData(string *saveData){ } dataLine += ":"; - dataLine += UniqueID; + dataLine += uniqueID; dataLine += "\n"; dataLineProcessed = OutputText(&dataLine); @@ -254,7 +254,7 @@ void CalendarJournalObject::SaveObjectData(string *saveData){ } - if (OrganiserDataTokens.size() > 0){ + if (organiserDataTokens.size() > 0){ dataLine += ";"; dataLine += organiserDataTokens; @@ -425,7 +425,7 @@ void CalendarJournalObject::SaveObjectData(string *saveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -745,7 +745,7 @@ void CalendarJournalObject::SaveObjectData(string *saveData){ } - if dDescriptionListLanguage[descriptionListSeek].size() > 0){ + if (descriptionListLanguage[descriptionListSeek].size() > 0){ dataLine += ";LANGUAGE="; dataLine += descriptionListLanguage[descriptionListSeek]; @@ -838,7 +838,7 @@ void CalendarJournalObject::SaveObjectData(string *saveData){ if (relatedToDataTokens[requestToDataSeek].size() > 0){ dataLine += ";"; - dataLine += RelatedToDataTokens[requestToDataSeek]; + dataLine += relatedToDataTokens[requestToDataSeek]; } @@ -950,7 +950,7 @@ void CalendarJournalObject::SaveObjectData(string *saveData){ dataLine += xTokensDataTokens[xTokenSeek]; dataLine += ":"; dataLine += xTokensData[xTokenSeek]; - dDataLine += "\n"; + dataLine += "\n"; dataLineProcessed = OutputText(&dataLine); diff --git a/source/objects/calendarjournal/CalendarJournal.cpp b/source/objects/calendarjournal/CalendarJournal.cpp index 616b5a5..5275dff 100644 --- a/source/objects/calendarjournal/CalendarJournal.cpp +++ b/source/objects/calendarjournal/CalendarJournal.cpp @@ -122,8 +122,8 @@ CalendarObjectValidResult CalendarJournalObject::ValidObject(){ for (vector::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; @@ -160,7 +160,7 @@ void CalendarJournalObject::ProcessData(){ multimap dataReceived; map propertyData; - string *PropertyNameData = nullptr; + string *propertyNameData = nullptr; int objectSeekCount = 0; // Get the Date Time Stamp (DTSTAMP). @@ -467,7 +467,7 @@ void CalendarJournalObject::ProcessData(){ } - statusData = DataReceived.begin()->second; + statusData = dataReceived.begin()->second; } @@ -610,7 +610,7 @@ void CalendarJournalObject::ProcessData(){ } if (propertyTokens.size() > 0){ - attachListTokens[objectSeekCount] = PropertyTokens; + attachListTokens[objectSeekCount] = propertyTokens; } attachList[objectSeekCount] = iter->second; @@ -742,7 +742,7 @@ void CalendarJournalObject::ProcessData(){ propertyNameData = (string*)&iter->first; - propertyData = SplitValues(*PropertyNameData); + propertyData = SplitValues(*propertyNameData); for(map::iterator dataiter = propertyData.begin(); dataiter != propertyData.end(); dataiter++){ diff --git a/source/objects/calendarobject/CalendarObject.cpp b/source/objects/calendarobject/CalendarObject.cpp index 8e33eda..6cfe78b 100644 --- a/source/objects/calendarobject/CalendarObject.cpp +++ b/source/objects/calendarobject/CalendarObject.cpp @@ -72,7 +72,7 @@ CalendarObjectLoadResult CalendarObject::LoadString(std::string *loadStringData) bool colonFound = false; bool quoteMode = false; char bufferChar = 0; - int stringDataSize = LoadStringData->size(); + int stringDataSize = loadStringData->size(); int seekCount = 0; string propertyName; string propertyValue; @@ -197,8 +197,8 @@ CalendarObjectLoadResult CalendarObject::LoadString(std::string *loadStringData) } - processBaseData(); - processData(); + ProcessBaseData(); + ProcessData(); return stringProcResult; @@ -266,8 +266,8 @@ CalendarObjectValidResult CalendarObject::ValidBaseObject(){ 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(); diff --git a/source/objects/calendartask/CalendarTask-Save.cpp b/source/objects/calendartask/CalendarTask-Save.cpp index 6a138bd..e92fdf3 100644 --- a/source/objects/calendartask/CalendarTask-Save.cpp +++ b/source/objects/calendartask/CalendarTask-Save.cpp @@ -20,7 +20,7 @@ using namespace std; -void CalendarTaskObject::SaveObjectData(string *SaveData){ +void CalendarTaskObject::SaveObjectData(string *saveData){ string dataLine = ""; string dataLineProcessed = ""; @@ -202,7 +202,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -242,7 +242,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -270,7 +270,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -298,7 +298,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -339,7 +339,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -395,7 +395,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -423,7 +423,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -449,7 +449,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -462,7 +462,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLine += "PRIORITY"; - if (PriorityTokens.size() > 0){ + if (priorityTokens.size() > 0){ dataLine += ";"; dataLine += priorityTokens; @@ -475,7 +475,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -522,7 +522,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -548,7 +548,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -674,7 +674,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -714,7 +714,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -764,7 +764,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -878,7 +878,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -916,7 +916,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -962,7 +962,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1008,7 +1008,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1053,7 +1053,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1091,7 +1091,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1102,34 +1102,34 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ // 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(); @@ -1175,7 +1175,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1220,7 +1220,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1236,7 +1236,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ for (int calendarAlarmDataSeek = 0; calendarAlarmDataSeek < calendarAlarmData.size(); calendarAlarmDataSeek++){ - *SaveData += "BEGIN:VALARM\n"; + *saveData += "BEGIN:VALARM\n"; // Process the ACTION VALARM value. @@ -1255,7 +1255,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1293,7 +1293,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1319,7 +1319,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1360,7 +1360,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1401,7 +1401,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1427,7 +1427,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1539,7 +1539,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1591,7 +1591,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1614,7 +1614,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ dataLineProcessed = OutputText(&dataLine); - *SaveData += dataLineProcessed; + *saveData += dataLineProcessed; dataLine.clear(); dataLineProcessed.clear(); @@ -1623,7 +1623,7 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ } - *SaveData += "END:VALARM\n"; + *saveData += "END:VALARM\n"; } @@ -1631,19 +1631,19 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ // 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(); @@ -1652,6 +1652,6 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){ } - *SaveData += "END:VTODO\n"; + *saveData += "END:VTODO\n"; } \ No newline at end of file diff --git a/source/objects/calendartask/CalendarTask.cpp b/source/objects/calendartask/CalendarTask.cpp index 84a7a50..613d68e 100644 --- a/source/objects/calendartask/CalendarTask.cpp +++ b/source/objects/calendartask/CalendarTask.cpp @@ -122,8 +122,8 @@ CalendarObjectValidResult CalendarTaskObject::ValidObject(){ for (vector::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; @@ -223,7 +223,7 @@ void CalendarTaskObject::ProcessData(){ // Process the data from COMPLETED. - dataReceived = processTextVectors(&ObjectName, &ObjectData, false, "COMPLETED"); + dataReceived = ProcessTextVectors(&objectName, &objectData, false, "COMPLETED"); if (dataReceived.begin() != dataReceived.end()){ @@ -243,7 +243,7 @@ void CalendarTaskObject::ProcessData(){ dataReceived = ProcessTextVectors(&objectName, &objectData, false, "CREATED"); - if (DataReceived.begin() != DataReceived.end()){ + if (dataReceived.begin() != dataReceived.end()){ try { dateTimeCreatedTokens = dataReceived.begin()->first.substr(8); @@ -301,7 +301,7 @@ void CalendarTaskObject::ProcessData(){ if (propertyTokens.size() > 0){ descriptionListTokens.clear(); - descriptionListTokens.push_back(PropertyTokens); + descriptionListTokens.push_back(propertyTokens); } descriptionList.clear(); @@ -1100,7 +1100,7 @@ void CalendarTaskObject::ProcessData(){ } if (propertyTokens.size() > 0){ - commentListTokens[objectSeekCount] = PropertyTokens; + commentListTokens[objectSeekCount] = propertyTokens; } commentList[objectSeekCount] = iter->second; @@ -1218,7 +1218,7 @@ void CalendarTaskObject::ProcessData(){ } if (propertyTokens.size() > 0){ - excludeDateDataTokens[ObjectSeekCount] = propertyTokens; + excludeDateDataTokens[objectSeekCount] = propertyTokens; } excludeDateData[objectSeekCount] = iter->second; @@ -1385,7 +1385,7 @@ void CalendarTaskObject::ProcessData(){ } if (propertyTokens.size() > 0){ - resourcesDataTokens[objectSeekCount] = PropertyTokens; + resourcesDataTokens[objectSeekCount] = propertyTokens; } resourcesData[objectSeekCount] = iter->second; @@ -1583,7 +1583,7 @@ void CalendarTaskObject::ProcessData(){ bool tokenData = false; string propertyTokens; - propertyameData = (string*)&dataReceived.begin()->first; + propertyNameData = (string*)&dataReceived.begin()->first; propertyData = SplitValues(*propertyNameData); @@ -1897,7 +1897,7 @@ void CalendarTaskObject::ProcessData(){ xtokeniter->size() > 2){ newAlarmData.xTokensData.push_back(eventAlarmData[seekCount][alarmObjectCount]); - newAlarmData.xTokensDataTokens.push_back(EventAlarmName[seekCount][alarmObjectCount]); + newAlarmData.xTokensDataTokens.push_back(eventAlarmName[seekCount][alarmObjectCount]); } diff --git a/source/objects/calendartimezone/CalendarTimezone-Save.cpp b/source/objects/calendartimezone/CalendarTimezone-Save.cpp index 109d664..d095270 100644 --- a/source/objects/calendartimezone/CalendarTimezone-Save.cpp +++ b/source/objects/calendartimezone/CalendarTimezone-Save.cpp @@ -16,11 +16,11 @@ // You should have received a copy of the GNU General Public License along // with Xestia Calendar. If not, see -#include "Calendartimezone.h" +#include "CalendarTimezone.h" using namespace std; -void CalendartimezoneObject::SaveObjectData(string *saveData){ +void CalendarTimezoneObject::SaveObjectData(string *saveData){ string dataLine = ""; string dataLineProcessed = ""; diff --git a/source/objects/calendartimezone/CalendarTimezone.cpp b/source/objects/calendartimezone/CalendarTimezone.cpp index a1f6648..e827161 100644 --- a/source/objects/calendartimezone/CalendarTimezone.cpp +++ b/source/objects/calendartimezone/CalendarTimezone.cpp @@ -64,14 +64,14 @@ int seekCount = 0; 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; @@ -199,7 +199,7 @@ void CalendarTimezoneObject::ProcessData(){ bool timeZoneOffsetToFound = false; bool timeZoneOffsetFromFound = false; - timezoneDataStruct newTZData; + TimezoneDataStruct newTZData; // Process the data from DTSTART. diff --git a/source/tests/xestiacalendar_caldav.h b/source/tests/xestiacalendar_caldav.h index 200d989..56f3217 100644 --- a/source/tests/xestiacalendar_caldav.h +++ b/source/tests/xestiacalendar_caldav.h @@ -22,8 +22,8 @@ #include using namespace std; -string EntryCalendarHREFProcessing = ""; -string EntryUUID = ""; +string entryCalendarHREFProcessing = ""; +string entryUUID = ""; TEST(CalDAV, BasicTests){ @@ -142,29 +142,29 @@ 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. @@ -179,9 +179,9 @@ TEST(CalDAV, BasicTests){ 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). @@ -194,20 +194,20 @@ TEST(CalDAV, BasicTests){ 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. @@ -220,25 +220,25 @@ TEST(CalDAV, BasicTests){ 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); @@ -248,20 +248,20 @@ TEST(CalDAV, BasicTests){ 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); } @@ -301,7 +301,7 @@ TEST(CalDAV, BuildServerAddress){ // Setup the server address. - if (connNormal.UseSSL == true){ + if (connNormal.useSSL == true){ serverAddress += "https://"; } else { serverAddress += "http://"; @@ -314,7 +314,7 @@ TEST(CalDAV, BuildServerAddress){ if (connNormal.port != 80){ serverAddress += ":"; - serverAddress += to_string(ConnNormal.Port); + serverAddress += to_string(connNormal.port); } serverAddress += "/principals/"; @@ -421,15 +421,15 @@ TEST(CalDAV, GetCalendarHome){ // 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. @@ -541,7 +541,7 @@ TEST(CalDAV, AddCalendar){ 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); @@ -600,7 +600,7 @@ TEST(CalDAV, EditCalendar){ 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); @@ -874,7 +874,7 @@ TEST(CalDAV, AddEntry){ bool itemFound = false; for (map::iterator calendarNameIter = calendarList.name.begin(); - calendarNameIter != calendarList.Name.end(); calendarNameIter++){ + calendarNameIter != calendarList.name.end(); calendarNameIter++){ if (calendarNameIter->second == "Scratching Calendar"){ itemFound = true; @@ -957,7 +957,7 @@ TEST(CalDAV, GetEntryETag){ // Connect to the server. - CalDAVServerResult connResult = ServerConnection.Connect(); + CalDAVServerResult connResult = serverConnection.Connect(); EXPECT_EQ(CALDAVQUERYRESULT_OK, connResult.result); ASSERT_EQ(200, connResult.httpCode); @@ -1243,7 +1243,7 @@ TEST(CalDAV, GetEntryList){ string calendarTagURL = ""; for (std::map::iterator calHREFIter = calendarList.href.begin(); - calHREFIter != calendarList.HREF.end(); calHREFIter++){ + calHREFIter != calendarList.href.end(); calHREFIter++){ if (calHREFIter->second.substr(calHREFIter->second.length() - 13) == "/unittestcal/"){ diff --git a/source/tests/xestiacalendar_commonfunctions.h b/source/tests/xestiacalendar_commonfunctions.h index 7e4e7c8..a106a58 100644 --- a/source/tests/xestiacalendar_commonfunctions.h +++ b/source/tests/xestiacalendar_commonfunctions.h @@ -193,8 +193,8 @@ TEST(CommonFunctions, SplitNameValueTests){ 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"); @@ -498,7 +498,7 @@ TEST(CommonFunctions, PreviousMonthNumberofDays){ TEST(CommonFunctions, monthViewGenerator){ - XCCalendarmonthViewGrid monthView = GenerateMonthGrid(6, 2016); + XCCalendarMonthViewGrid monthView = GenerateMonthGrid(6, 2016); // First week. diff --git a/source/tests/xestiacalendar_icaleventload.h b/source/tests/xestiacalendar_icaleventload.h index 8199ebf..fc2d986 100644 --- a/source/tests/xestiacalendar_icaleventload.h +++ b/source/tests/xestiacalendar_icaleventload.h @@ -87,19 +87,19 @@ TEST(iCalendarEvent, ObjectDataTests){ 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); @@ -193,8 +193,8 @@ TEST(iCalendarEvent, ObjectDataTests){ 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. @@ -261,19 +261,19 @@ TEST(iCalendarEvent, ObjectDataTests){ } - 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]; @@ -450,21 +450,21 @@ TEST(iCalendarEvent, ObjectDataTests){ 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]; } @@ -1099,19 +1099,19 @@ TEST(iCalendarEvent, AlarmTests){ 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; } @@ -1139,11 +1139,11 @@ TEST(iCalendarEvent, AlarmTests){ 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]; diff --git a/source/tests/xestiacalendar_icalfreebusyload.h b/source/tests/xestiacalendar_icalfreebusyload.h index 419aaf3..2887281 100644 --- a/source/tests/xestiacalendar_icalfreebusyload.h +++ b/source/tests/xestiacalendar_icalfreebusyload.h @@ -41,8 +41,8 @@ TEST(iCalendarFreeBusy, ObjectDataTests){ // 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. @@ -130,7 +130,7 @@ TEST(iCalendarFreeBusy, ObjectDataTests){ } - ASSERT_EQ("attendee One", attendeeData); + ASSERT_EQ("Attendee One", attendeeData); // Second ATTENDEE property. @@ -299,9 +299,9 @@ TEST(iCalendarFreeBusy, ObjectDataTests){ 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]; } @@ -313,15 +313,15 @@ TEST(iCalendarFreeBusy, ObjectDataTests){ 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]; } @@ -335,21 +335,21 @@ TEST(iCalendarFreeBusy, ObjectDataTests){ 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]; } diff --git a/source/tests/xestiacalendar_icaljournalload.h b/source/tests/xestiacalendar_icaljournalload.h index 7c0b0ce..a172357 100644 --- a/source/tests/xestiacalendar_icaljournalload.h +++ b/source/tests/xestiacalendar_icaljournalload.h @@ -688,9 +688,9 @@ TEST(iCalendarJournal, ObjectDataTests){ 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]; } @@ -703,21 +703,21 @@ TEST(iCalendarJournal, ObjectDataTests){ 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]; } @@ -731,15 +731,15 @@ TEST(iCalendarJournal, ObjectDataTests){ 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]; } diff --git a/source/tests/xestiacalendar_icaltaskload.h b/source/tests/xestiacalendar_icaltaskload.h index 439ba4e..2fb4788 100644 --- a/source/tests/xestiacalendar_icaltaskload.h +++ b/source/tests/xestiacalendar_icaltaskload.h @@ -1066,54 +1066,54 @@ TEST(iCalendarTask, AlarmTests){ // 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. @@ -1248,19 +1248,19 @@ TEST(iCalendarTask, AlarmTests){ // 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(); @@ -1272,19 +1272,19 @@ TEST(iCalendarTask, AlarmTests){ 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; @@ -1293,19 +1293,19 @@ TEST(iCalendarTask, AlarmTests){ } - 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); @@ -1356,19 +1356,19 @@ TEST(iCalendarTask, AlarmTests){ // 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(); @@ -1378,10 +1378,10 @@ TEST(iCalendarTask, AlarmTests){ descriptionLanguage.clear(); descriptionTokens.clear(); - string SummaryData; - string SummaryAltRep; - string SummaryLanguage; - string SummaryTokens; + string summaryData; + string summaryAltRep; + string summaryLanguage; + string summaryTokens; string attendeeDataMember; string attendeeDataDelegatedFrom; @@ -1405,55 +1405,55 @@ TEST(iCalendarTask, AlarmTests){ 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. diff --git a/source/tests/xestiacalendar_icaltimezoneload.h b/source/tests/xestiacalendar_icaltimezoneload.h index 7244966..78dc2b9 100644 --- a/source/tests/xestiacalendar_icaltimezoneload.h +++ b/source/tests/xestiacalendar_icaltimezoneload.h @@ -55,21 +55,21 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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; } @@ -93,7 +93,7 @@ TEST(iCalendarTimezone, ObjectDataTests){ std::string recurranceDateData; std::string recurranceDateValue; - std::string recurranceDateDatatimeZoneParam; + std::string recurranceDateDataTimeZoneParam; std::string recurranceDateDataTokens; std::string timeZoneNameData; @@ -107,24 +107,24 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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; } @@ -144,69 +144,69 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -227,7 +227,7 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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); @@ -243,11 +243,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -257,11 +257,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -271,11 +271,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -285,11 +285,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -299,11 +299,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -313,11 +313,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -327,11 +327,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -341,11 +341,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -358,21 +358,21 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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; } @@ -396,7 +396,7 @@ TEST(iCalendarTimezone, ObjectDataTests){ recurranceDateData.clear(); recurranceDateValue.clear(); - recurranceDateDatatimeZoneParam.clear(); + recurranceDateDataTimeZoneParam.clear(); recurranceDateDataTokens.clear(); timeZoneNameData.clear(); @@ -410,24 +410,24 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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; } @@ -447,69 +447,69 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -546,11 +546,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -560,11 +560,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -574,11 +574,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -588,11 +588,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -602,11 +602,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -616,11 +616,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -630,11 +630,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } @@ -644,11 +644,11 @@ TEST(iCalendarTimezone, ObjectDataTests){ 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]; } diff --git a/source/tests/xestiacalendar_populate.cpp b/source/tests/xestiacalendar_populate.cpp index 156527f..59c7630 100644 --- a/source/tests/xestiacalendar_populate.cpp +++ b/source/tests/xestiacalendar_populate.cpp @@ -20,7 +20,7 @@ void populatecaldav(){ - CalDAV PopulateCalDAV; + CalDAV populateCalDAV; // Load the connection settings. @@ -57,18 +57,18 @@ void populatecaldav(){ 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; } @@ -89,7 +89,7 @@ void populatecaldav(){ // Look for the Unit testing calendar. for (std::map::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; @@ -107,7 +107,7 @@ void populatecaldav(){ // Delete the previous calendar. - serverResult = PopulateCalDAV.DeleteCalendar(&calendarURI); + serverResult = populateCalDAV.DeleteCalendar(&calendarURI); if (serverResult.code != CURLE_OK){ @@ -123,7 +123,7 @@ void populatecaldav(){ 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; @@ -149,7 +149,7 @@ void populatecaldav(){ // Look for the Unit testing calendar. for (std::map::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; @@ -242,7 +242,7 @@ void populatecaldav(){ calendarEntryURI = calendarURI; calendarEntryURI += entryFilename[entrySeek]; - serverResult = PopulateCalDAV.AddEntry(&calendarEntryURI, &entryData[entrySeek]); + serverResult = populateCalDAV.AddEntry(&calendarEntryURI, &entryData[entrySeek]); if (serverResult.code != CURLE_OK){ diff --git a/source/tests/xestiacalendar_test.cpp b/source/tests/xestiacalendar_test.cpp index fa0a353..2e4737b 100644 --- a/source/tests/xestiacalendar_test.cpp +++ b/source/tests/xestiacalendar_test.cpp @@ -198,7 +198,7 @@ int main(int argc, char* argv[]){ // Find which option has been selected from the // input. - switch(IntOption){ + switch(intOption){ case TESTS_ICALLOADEVENT: printn("Running iCalendar Event Component tests..."); diff --git a/source/tests/xestiacalendar_testcommon.cpp b/source/tests/xestiacalendar_testcommon.cpp index af2a7ca..1dd9843 100644 --- a/source/tests/xestiacalendar_testcommon.cpp +++ b/source/tests/xestiacalendar_testcommon.cpp @@ -21,8 +21,8 @@ #include "xestiacalendar_testcommon.h" #include "../common/file.h" -ProcessConnectionDataFileResult ProcessConnectionDataFile(string DataFilename, - CalDAVConnectionData *ConnData){ +ProcessConnectionDataFileResult ProcessConnectionDataFile(string dataFilename, + CalDAVConnectionData *connData){ ProcessConnectionDataFileResult processResult = PROCESSCONNECTIONDATAFILE_UNITTESTFAIL; @@ -50,7 +50,7 @@ ProcessConnectionDataFileResult ProcessConnectionDataFile(string DataFilename, char *bufferRead = new char[256]; - while (!FileStream.eof()){ + while (!fileStream.eof()){ fileStream.getline(bufferRead, 256); receivedStringData.append(bufferRead); @@ -121,7 +121,7 @@ ProcessConnectionDataFileResult ProcessConnectionDataFile(string DataFilename, // CalDAVConnectionData handle. if (portNumValid == true){ - connData->Port = portNum; + connData->port = portNum; serverPortFound = true; } @@ -136,7 +136,7 @@ ProcessConnectionDataFileResult ProcessConnectionDataFile(string DataFilename, // Setup the server pass. - connData->Password = propertyValue; + connData->password = propertyValue; serverPassFound = true; } else if (propertyName == "ssl" && serverSSLFound == false){ diff --git a/source/widgets/XCCalendarDay.cpp b/source/widgets/XCCalendarDay.cpp index 110d321..5d48472 100644 --- a/source/widgets/XCCalendarDay.cpp +++ b/source/widgets/XCCalendarDay.cpp @@ -66,7 +66,7 @@ XCCalendarDay::XCCalendarDay(wxWindow *parent, const wxString& title, const wxPo eventListFrame->SetScrollRate(0,1); //EventListFrameSizer->FitInside(EventListFrame); - eventListFrameSizer->Fit(EventListFrame); + eventListFrameSizer->Fit(eventListFrame); eventListFrameSizer->Layout(); windowSizer->Fit(this); @@ -243,7 +243,7 @@ void XCCalendarDay::DeselectOthersEvent(wxCommandEvent &deselectEvent) } -void XCCalendarDay::DeselectAllEvent(wxCommandEvent &DeselectEvent) +void XCCalendarDay::DeselectAllEvent(wxCommandEvent &deselectEvent) { int selectedEntryID = deselectEvent.GetInt(); @@ -252,7 +252,7 @@ void XCCalendarDay::DeselectAllEvent(wxCommandEvent &DeselectEvent) deselectEntryEvent.SetId(ID_ENTRYDESELECT); for (vector::iterator entryIter = calendarEntryList.begin(); - entryIter != calendarEntryList.end(); EntryIter++){ + entryIter != calendarEntryList.end(); entryIter++){ wxPostEvent((*entryIter), deselectEntryEvent); @@ -459,7 +459,7 @@ void XCCalendarDay::ShowCalendarEntries(wxCommandEvent &calendarData){ } - wxSizerItem *calendarItem = EventListFrameSizer->GetItem((*calendarEntryIter)); + wxSizerItem *calendarItem = eventListFrameSizer->GetItem((*calendarEntryIter)); (*calendarEntryIter)->Show(true); // Get the spacing and hide it as well. @@ -522,7 +522,7 @@ void XCCalendarDay::DeleteCalendarEntry(wxCommandEvent &eventData){ 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. diff --git a/source/widgets/XCCalendarDayEntry.cpp b/source/widgets/XCCalendarDayEntry.cpp index 136d5c6..cc5dea6 100644 --- a/source/widgets/XCCalendarDayEntry.cpp +++ b/source/widgets/XCCalendarDayEntry.cpp @@ -246,21 +246,21 @@ void XCCalendarDayEntry::SetTime(int timeHour, int timeMinute, int timeSecond){ } -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(); diff --git a/source/widgets/XCCalendarManipulator.cpp b/source/widgets/XCCalendarManipulator.cpp index e3f35ec..f8971ca 100644 --- a/source/widgets/XCCalendarManipulator.cpp +++ b/source/widgets/XCCalendarManipulator.cpp @@ -70,7 +70,7 @@ XCCalendarManipulator::XCCalendarManipulator(wxWindow* parent, const wxString& t test.SetWeight(wxFONTWEIGHT_BOLD); test.SetPointSize(18); - dateButton->SetFont(Test); + dateButton->SetFont(test); dateButton->SetForegroundColour(wxColour(255,255,255)); // Setup the event controls. diff --git a/source/widgets/XCCalendarMenu.cpp b/source/widgets/XCCalendarMenu.cpp index c3d07a9..1ca0550 100644 --- a/source/widgets/XCCalendarMenu.cpp +++ b/source/widgets/XCCalendarMenu.cpp @@ -62,7 +62,7 @@ void XCCalendarMenu::AppendMenuItem(wxString objectName, // 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)); @@ -81,7 +81,7 @@ void XCCalendarMenu::ProcessMenuItemClick( wxCommandEvent& event){ int itemID = event.GetId(); - PopupPtr->Dismiss(); + popupPtr->Dismiss(); switch (itemID){ @@ -90,7 +90,7 @@ void XCCalendarMenu::ProcessMenuItemClick( wxCommandEvent& event){ 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: @@ -103,7 +103,7 @@ void XCCalendarMenu::ProcessMenuItemClick( wxCommandEvent& event){ 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; @@ -125,12 +125,12 @@ void XCCalendarMenu::SetAccountPreferencesID(int accountPreferencesID){ void XCCalendarMenu::SetWindowPointer(wxWindow *windowPointer){ - WindowPtr = windowPointer; + windowPtr = windowPointer; } void XCCalendarMenu::SetPopupPointer(wxPopupTransientWindow *popupPointer){ - PopupPtr = popupPointer; + popupPtr = popupPointer; } \ No newline at end of file diff --git a/source/widgets/XCCalendarMonthView.cpp b/source/widgets/XCCalendarMonthView.cpp index e5c384f..a7443e9 100644 --- a/source/widgets/XCCalendarMonthView.cpp +++ b/source/widgets/XCCalendarMonthView.cpp @@ -39,13 +39,13 @@ XCCalendarMonthView::XCCalendarMonthView(wxWindow *parent, const wxString& title 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); @@ -97,13 +97,13 @@ XCCalendarMonthView::XCCalendarMonthView(XCCalendarMonthViewGrid *grid, Calendar 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); @@ -148,7 +148,7 @@ void XCCalendarMonthView::ProcessGrid(XCCalendarMonthViewGrid *grid, std::vector week++; for (vector::iterator dayIter = (*weekIter).dayList.begin(); - dayIter != (*weekIter).dayList.end(); DayIter++){ + dayIter != (*weekIter).dayList.end(); dayIter++){ // Add Calendar entries. @@ -200,10 +200,10 @@ void XCCalendarMonthView::ResizeFrameEvent(wxSizeEvent &SizeEvent){ } -void XCCalendarMonthView::DeselectOthersEvent(wxCommandEvent &DeselectEvent){ +void XCCalendarMonthView::DeselectOthersEvent(wxCommandEvent &deselectEvent){ for (vector::iterator dayIter = calendarDayList.begin(); - dayIter != calendarDayList.end(); DayIter++){ + dayIter != calendarDayList.end(); dayIter++){ if (deselectEvent.GetClientData() != (void*)(*dayIter)){ diff --git a/source/widgets/XCEventMenu.cpp b/source/widgets/XCEventMenu.cpp index 7373545..6c02caa 100644 --- a/source/widgets/XCEventMenu.cpp +++ b/source/widgets/XCEventMenu.cpp @@ -88,7 +88,7 @@ void XCEventMenu::ProcessMenuItemClick( wxCommandEvent& event){ wxCommandEvent editEntry(XCMAIN_EDITEVENT); editEntry.SetId(ID_EDITEVENT); editEntry.SetInt(eventID); - wxPostEvent(WindowPtr, editEntry); + wxPostEvent(windowPtr, editEntry); } break; case ID_EVENTMENU_DELETE: @@ -101,7 +101,7 @@ void XCEventMenu::ProcessMenuItemClick( wxCommandEvent& event){ wxCommandEvent deleteEvent(XCMAIN_DELETEEVENT); deleteEvent.SetId(ID_DELETEEVENT); deleteEvent.SetClientData(eventInfo); - wxPostEvent(WindowPtr, deleteEvent); + wxPostEvent(windowPtr, deleteEvent); } break; -- 2.39.5