Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiaab
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e683cca
)
Added comments to describe functions in vcard/vcard.cpp
author
Steve Brokenshire
<sbrokenshire@xestia.co.uk>
Tue, 15 Mar 2016 23:07:39 +0000
(23:07 +0000)
committer
Steve Brokenshire
<sbrokenshire@xestia.co.uk>
Tue, 15 Mar 2016 23:07:39 +0000
(23:07 +0000)
source/vcard/vcard.cpp
patch
|
blob
|
history
diff --git
a/source/vcard/vcard.cpp
b/source/vcard/vcard.cpp
index
a25f2dc
..
b6a9ee9
100644
(file)
--- a/
source/vcard/vcard.cpp
+++ b/
source/vcard/vcard.cpp
@@
-27,6
+27,8
@@
vCard::vCard(){
vCard::vCard(){
+ // Setup the vCard object.
+
vCardBegin = FALSE;
vCardEnd = FALSE;
vCardFN = FALSE;
vCardBegin = FALSE;
vCardEnd = FALSE;
vCardFN = FALSE;
@@
-37,6
+39,8
@@
vCard::vCard(){
void vCard::Add(wxString SettingName, wxString SettingValue, bool ReplaceMode){
void vCard::Add(wxString SettingName, wxString SettingValue, bool ReplaceMode){
+ // Add data to vCard object.
+
// Check for backslashes used for commas, newlines and
// backslashes used for values.
// Check for backslashes used for commas, newlines and
// backslashes used for values.
@@
-101,6
+105,8
@@
void vCard::Add(wxString SettingName, wxString SettingValue, bool ReplaceMode){
void vCard::AddRaw(wxString SettingName, wxString SettingValue){
void vCard::AddRaw(wxString SettingName, wxString SettingValue){
+ // Add data to the vCard in raw mode.
+
// Check data to make sure that it meets the required
// vCard 4.0 specifications.
// Check data to make sure that it meets the required
// vCard 4.0 specifications.
@@
-145,10
+151,12
@@
void vCard::AddRaw(wxString SettingName, wxString SettingValue){
wxString vCard::Get(wxString SettingName){
wxString vCard::Get(wxString SettingName){
+ // Get values from the vCard object.
+
wxString SettingValue;
// Look for the setting name.
wxString SettingValue;
// Look for the setting name.
-
+
for (int i = 0; i < SettingCount; i++){
if (SettingNames[i] == SettingName){
for (int i = 0; i < SettingCount; i++){
if (SettingNames[i] == SettingName){
@@
-177,6
+185,8
@@
wxString vCard::Get(wxString SettingName){
vCardName vCard::GetName(){
vCardName vCard::GetName(){
+ // Get the name from the vCard object.
+
vCardName NameData;
ArrayvCardOutData NameArray = this->GetByPartial(wxT("N"));
//wxString NameDataGet = NameArray.PropValues[0];
vCardName NameData;
ArrayvCardOutData NameArray = this->GetByPartial(wxT("N"));
//wxString NameDataGet = NameArray.PropValues[0];
@@
-270,6
+280,8
@@
vCardName vCard::GetName(){
ArrayvCardOutData vCard::GetByPartial(wxString SettingName){
ArrayvCardOutData vCard::GetByPartial(wxString SettingName){
+ // Get data from the vCard object based on a partial match.
+
ArrayvCardOutData vCardOutData;
wxArrayString SettingList;
wxString SettingValueCurrent;
ArrayvCardOutData vCardOutData;
wxArrayString SettingList;
wxString SettingValueCurrent;
@@
-346,6
+358,8
@@
ArrayvCardOutData vCard::GetByPartial(wxString SettingName){
wxString vCard::GetById(int id){
wxString vCard::GetById(int id){
+ // Get data from the vCard object based on ID.
+
// Unimplemented.
return wxT("");
// Unimplemented.
return wxT("");
@@
-353,6
+367,8
@@
wxString vCard::GetById(int id){
int vCard::WriteFile(wxString WriteFilename){
int vCard::WriteFile(wxString WriteFilename){
+ // Write the vCard to a file using the WriteFilename given.
+
// Open the file and begin writing data into the file.
wxString SettingName;
// Open the file and begin writing data into the file.
wxString SettingName;
@@
-431,14
+447,16
@@
int vCard::WriteFile(wxString WriteFilename){
int vCard::LoadFile(wxString LoadFilename){
int vCard::LoadFile(wxString LoadFilename){
+ // Load data from a file using the LoadFilename given.
+
wxFFile ContactFile;
wxString wxSContactString;
vCardFilename = LoadFilename;
wxFFile ContactFile;
wxString wxSContactString;
vCardFilename = LoadFilename;
- // Check if we are using wxWidgets version 2.8 or less and
- // execute the required command accordingly.
+
// Check if we are using wxWidgets version 2.8 or less and
+
// execute the required command accordingly.
#if wxABI_VERSION < 20900
ContactFile.Open(LoadFilename.c_str(), wxT("r"));
#if wxABI_VERSION < 20900
ContactFile.Open(LoadFilename.c_str(), wxT("r"));
@@
-464,6
+482,8
@@
int vCard::LoadFile(wxString LoadFilename){
int vCard::LoadString(wxString ContactData){
int vCard::LoadString(wxString ContactData){
+ // Load data from a wxString.
+
ProcessString(&ContactData);
return 0;
ProcessString(&ContactData);
return 0;
@@
-472,6
+492,8
@@
int vCard::LoadString(wxString ContactData){
void vCard::ProcessString(wxString *ContactDataInc){
void vCard::ProcessString(wxString *ContactDataInc){
+ // Process data from a wxString pointer.
+
// Split the vCards (if there are more than one vCard in the file).
wxString ContactLine;
// Split the vCards (if there are more than one vCard in the file).
wxString ContactLine;
@@
-673,6
+695,8
@@
void vCard::ProcessString(wxString *ContactDataInc){
wxString vCard::WriteString(){
wxString vCard::WriteString(){
+ // Write the vCard file into a wxString.
+
// Open the file and begin writing data into the file.
wxString SettingName;
// Open the file and begin writing data into the file.
wxString SettingName;
@@
-769,12
+793,16
@@
wxString vCard::Convert(wxString SettingValue, bool ReplaceMode){
wxString vCard::GetFilename(){
wxString vCard::GetFilename(){
+ // Get the filename associated with the vCard object.
+
return vCardFilename;
}
std::map<int,wxString>* vCard::GetAllCards(){
return vCardFilename;
}
std::map<int,wxString>* vCard::GetAllCards(){
+ // Get all of vCards within the vCard object.
+
return &Cards;
}
\ No newline at end of file
return &Cards;
}
\ No newline at end of file
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy