--- /dev/null
+// CalendarList.cpp - Account calendar list.
+//
+// (c) 2016 Xestia Software Development.
+//
+// This file is part of Xestia Calendar.
+//
+// Xestia Calendar is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Calendar is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with Xestia Calendar. If not, see <http://www.gnu.org/licenses/>
+
+#include "CalendarList.h"
+
+using namespace std;
+
+XCAccountCalendarList::XCAccountCalendarList(string calendarListFilename){
+
+ // Load the account calendar list.
+
+ wxString calendarListFilenameFull;
+
+ calendarListFilenameFull.Append(calendarListFilename);
+ calendarListFilenameFull.Append(wxT("/calendarlist.db"));
+
+ wxFileConfig *calendarListFile = new wxFileConfig("", "", calendarListFilenameFull);
+
+ // Go through the list of calendars.
+
+ bool continueProcessing = true;
+ wxString accountName;
+ long itemIndex =0;
+
+ continueProcessing = calendarListFile->GetFirstGroup(accountName, itemIndex);
+
+ while (continueProcessing){
+
+ wxString valueData;
+ Colour colourData;
+
+ calendarListFile->SetPath(accountName);
+
+ calendarShortName.push_back(string(accountName.mb_str()));
+
+ calendarListFile->Read(wxT("name"), &valueData);
+ calendarName.push_back(string(valueData.mb_str()));
+
+ calendarListFile->Read(wxT("description"), &valueData);
+ calendarDescription.push_back(string(valueData.mb_str()));
+
+ calendarListFile->Read(wxT("colour"), &valueData);
+ colourData = string(valueData.mb_str());
+ calendarColour.push_back(colourData);
+
+ calendarStorageID.push_back(0);
+
+ accountName.clear();
+ calendarListFile->SetPath(wxT("/"));
+ continueProcessing = calendarListFile->GetNextGroup(accountName, itemIndex);
+
+ }
+
+}
+
+XCAccountCalendarList::~XCAccountCalendarList(){
+
+}
\ No newline at end of file
--- /dev/null
+// CalendarList.h - Account calendar list header.
+//
+// (c) 2016 Xestia Software Development.
+//
+// This file is part of Xestia Calendar.
+//
+// Xestia Calendar is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Calendar is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with Xestia Calendar. If not, see <http://www.gnu.org/licenses/>
+
+#ifndef __OBJECTS_CALENDARLIST_CALENDARLIST_H__
+#define __OBJECTS_CALENDARLIST_CALENDARLIST_H__
+
+#include <iostream>
+#include <iomanip>
+#include <ios>
+#include <string>
+#include <vector>
+#include <wx/fileconf.h>
+
+#include "colour.h"
+
+class XCAccountCalendarList{
+
+ public:
+ std::vector<string> calendarShortName;
+ std::vector<string> calendarName;
+ std::vector<string> calendarDescription;
+ std::vector<Colour> calendarColour;
+ std::vector<int> calendarStorageID;
+
+ XCAccountCalendarList(std::string calendarListFilename);
+ ~XCAccountCalendarList();
+
+
+};
+
+#endif
\ No newline at end of file