Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiacalendar
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
camelCase: Converted remaining code that was missed
[xestiacalendar/.git]
/
source
/
libraries
/
CalendarDataStorage
/
CalendarDataStorage.cpp
diff --git
a/source/libraries/CalendarDataStorage/CalendarDataStorage.cpp
b/source/libraries/CalendarDataStorage/CalendarDataStorage.cpp
index
c18a85b
..
4a690b2
100644
(file)
--- a/
source/libraries/CalendarDataStorage/CalendarDataStorage.cpp
+++ b/
source/libraries/CalendarDataStorage/CalendarDataStorage.cpp
@@
-20,8
+20,6
@@
#define CDS_RANDOMPOW 24
#define CDS_RANDOMPOW 24
-#include <iostream>
-
using namespace std;
static int callback(void *NotUsed, int argc, char **argv, char **azColName){
using namespace std;
static int callback(void *NotUsed, int argc, char **argv, char **azColName){
@@
-976,14
+974,14
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
// Start Date.
// Start Date.
- if (eventData.
D
ateTimeStartData.size() < 16){
+ if (eventData.
d
ateTimeStartData.size() < 16){
addResult.addEventResult = CDSENTRY_INVALIDFILE;
return addResult;
}
addResult.addEventResult = CDSENTRY_INVALIDFILE;
return addResult;
}
- eventString = eventData.
D
ateTimeStartData.substr(0,4);
+ eventString = eventData.
d
ateTimeStartData.substr(0,4);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-996,7
+994,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
ateTimeStartData.substr(4,2);
+ eventString = eventData.
d
ateTimeStartData.substr(4,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1009,7
+1007,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
ateTimeStartData.substr(6,2);
+ eventString = eventData.
d
ateTimeStartData.substr(6,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1022,7
+1020,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
ateTimeStartData.substr(9,2);
+ eventString = eventData.
d
ateTimeStartData.substr(9,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1035,7
+1033,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
ateTimeStartData.substr(11,2);
+ eventString = eventData.
d
ateTimeStartData.substr(11,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1048,7
+1046,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
ateTimeStartData.substr(13,2);
+ eventString = eventData.
d
ateTimeStartData.substr(13,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1073,16
+1071,16
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
int eventEndSecond = 0;
int eventEndDuration = 0;
int eventEndSecond = 0;
int eventEndDuration = 0;
- if (eventData.
D
ateTimeEndData != ""){
+ if (eventData.
d
ateTimeEndData != ""){
- if (eventData.
D
ateTimeEndData.size() < 16){
+ if (eventData.
d
ateTimeEndData.size() < 16){
addResult.addEventResult = CDSENTRY_INVALIDFILE;
return addResult;
}
addResult.addEventResult = CDSENTRY_INVALIDFILE;
return addResult;
}
- eventString = eventData.
D
ateTimeEndData.substr(0,4);
+ eventString = eventData.
d
ateTimeEndData.substr(0,4);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1095,7
+1093,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
ateTimeEndData.substr(4,2);
+ eventString = eventData.
d
ateTimeEndData.substr(4,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1108,7
+1106,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
ateTimeEndData.substr(6,2);
+ eventString = eventData.
d
ateTimeEndData.substr(6,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1121,7
+1119,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
ateTimeEndData.substr(9,2);
+ eventString = eventData.
d
ateTimeEndData.substr(9,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1134,7
+1132,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
ateTimeEndData.substr(11,2);
+ eventString = eventData.
d
ateTimeEndData.substr(11,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1147,7
+1145,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
ateTimeEndData.substr(13,2);
+ eventString = eventData.
d
ateTimeEndData.substr(13,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1162,7
+1160,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
}
}
- eventString = eventData.
D
urationData;
+ eventString = eventData.
d
urationData;
// Process the duration data.
// Process the duration data.
@@
-1174,22
+1172,22
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
// Get the duration (if DTEND hasn't been specified).
// Get the duration (if DTEND hasn't been specified).
- if (eventData.
D
urationData.size() > 0){
+ if (eventData.
d
urationData.size() > 0){
bool FoundP = false;
bool FoundW = false;
bool DateTimeMode = false;
bool FoundP = false;
bool FoundW = false;
bool DateTimeMode = false;
- std::string::iterator eventDataChar = eventData.
D
urationData.begin();
+ std::string::iterator eventDataChar = eventData.
d
urationData.begin();
std::string currentValue = "";
if (*eventDataChar != 'P'){
std::string currentValue = "";
if (*eventDataChar != 'P'){
- eventDataChar = eventData.
D
urationData.end();
+ eventDataChar = eventData.
d
urationData.end();
}
}
- for(eventDataChar; eventDataChar != eventData.
D
urationData.end(); eventDataChar++){
+ for(eventDataChar; eventDataChar != eventData.
d
urationData.end(); eventDataChar++){
// Check if value is a digit.
// Check if value is a digit.
@@
-1258,7
+1256,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
// Process Entry Name.
// Process Entry Name.
- resultCode = sqlite3_bind_text(statementHandle, 2, eventData.
S
ummaryData.c_str(), -1, SQLITE_STATIC);
+ resultCode = sqlite3_bind_text(statementHandle, 2, eventData.
s
ummaryData.c_str(), -1, SQLITE_STATIC);
if (resultCode != 0){
addResult.addEventResult = CDSENTRY_FAILED;
if (resultCode != 0){
addResult.addEventResult = CDSENTRY_FAILED;
@@
-1270,7
+1268,7
@@
CDSAddEntryResult CalendarDataStorage::AddEvent(int calendarID, std::string file
string eventDescription;
try {
string eventDescription;
try {
- eventDescription = eventData.
D
escriptionList.at(0);
+ eventDescription = eventData.
d
escriptionList.at(0);
}
catch (out_of_range &err){
}
catch (out_of_range &err){
@@
-1507,14
+1505,14
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
// Start Date.
// Start Date.
- if (eventData.
D
ateTimeStartData.size() < 16){
+ if (eventData.
d
ateTimeStartData.size() < 16){
editResult.editEventResult = CDSENTRY_INVALIDFILE;
return editResult;
}
editResult.editEventResult = CDSENTRY_INVALIDFILE;
return editResult;
}
- eventString = eventData.
D
ateTimeStartData.substr(0,4);
+ eventString = eventData.
d
ateTimeStartData.substr(0,4);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1527,7
+1525,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
ateTimeStartData.substr(4,2);
+ eventString = eventData.
d
ateTimeStartData.substr(4,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1540,7
+1538,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
ateTimeStartData.substr(6,2);
+ eventString = eventData.
d
ateTimeStartData.substr(6,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1553,7
+1551,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
ateTimeStartData.substr(9,2);
+ eventString = eventData.
d
ateTimeStartData.substr(9,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1566,7
+1564,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
ateTimeStartData.substr(11,2);
+ eventString = eventData.
d
ateTimeStartData.substr(11,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1579,7
+1577,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
ateTimeStartData.substr(13,2);
+ eventString = eventData.
d
ateTimeStartData.substr(13,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1604,16
+1602,16
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
int eventEndSecond = 0;
int eventEndDuration = 0;
int eventEndSecond = 0;
int eventEndDuration = 0;
- if (eventData.
D
ateTimeEndData != ""){
+ if (eventData.
d
ateTimeEndData != ""){
- if (eventData.
D
ateTimeEndData.size() < 16){
+ if (eventData.
d
ateTimeEndData.size() < 16){
editResult.editEventResult = CDSENTRY_INVALIDFILE;
return editResult;
}
editResult.editEventResult = CDSENTRY_INVALIDFILE;
return editResult;
}
- eventString = eventData.
D
ateTimeEndData.substr(0,4);
+ eventString = eventData.
d
ateTimeEndData.substr(0,4);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1626,7
+1624,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
ateTimeEndData.substr(4,2);
+ eventString = eventData.
d
ateTimeEndData.substr(4,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1639,7
+1637,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
ateTimeEndData.substr(6,2);
+ eventString = eventData.
d
ateTimeEndData.substr(6,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1652,7
+1650,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
ateTimeEndData.substr(9,2);
+ eventString = eventData.
d
ateTimeEndData.substr(9,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1665,7
+1663,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
ateTimeEndData.substr(11,2);
+ eventString = eventData.
d
ateTimeEndData.substr(11,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1678,7
+1676,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
ateTimeEndData.substr(13,2);
+ eventString = eventData.
d
ateTimeEndData.substr(13,2);
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
if (all_of(eventString.begin(), eventString.end(), ::isdigit)){
@@
-1693,7
+1691,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
}
}
- eventString = eventData.
D
urationData;
+ eventString = eventData.
d
urationData;
// Process the duration data.
// Process the duration data.
@@
-1705,22
+1703,22
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
// Get the duration (if DTEND hasn't been specified).
// Get the duration (if DTEND hasn't been specified).
- if (eventData.
D
urationData.size() > 0){
+ if (eventData.
d
urationData.size() > 0){
bool FoundP = false;
bool FoundW = false;
bool DateTimeMode = false;
bool FoundP = false;
bool FoundW = false;
bool DateTimeMode = false;
- std::string::iterator eventDataChar = eventData.
D
urationData.begin();
+ std::string::iterator eventDataChar = eventData.
d
urationData.begin();
std::string currentValue = "";
if (*eventDataChar != 'P'){
std::string currentValue = "";
if (*eventDataChar != 'P'){
- eventDataChar = eventData.
D
urationData.end();
+ eventDataChar = eventData.
d
urationData.end();
}
}
- for(eventDataChar; eventDataChar != eventData.
D
urationData.end(); eventDataChar++){
+ for(eventDataChar; eventDataChar != eventData.
d
urationData.end(); eventDataChar++){
// Check if value is a digit.
// Check if value is a digit.
@@
-1787,7
+1785,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
// Process Entry Name.
// Process Entry Name.
- resultCode = sqlite3_bind_text(statementHandle, 2, eventData.
S
ummaryData.c_str(), -1, SQLITE_STATIC);
+ resultCode = sqlite3_bind_text(statementHandle, 2, eventData.
s
ummaryData.c_str(), -1, SQLITE_STATIC);
if (resultCode != 0){
editResult.editEventResult = CDSENTRY_FAILED;
if (resultCode != 0){
editResult.editEventResult = CDSENTRY_FAILED;
@@
-1799,7
+1797,7
@@
CDSEditEntryResult CalendarDataStorage::UpdateEvent(int eventID, std::string fil
string eventDescription;
try {
string eventDescription;
try {
- eventDescription = eventData.
D
escriptionList.at(0);
+ eventDescription = eventData.
d
escriptionList.at(0);
}
catch (out_of_range &err){
}
catch (out_of_range &err){
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy