vCard::vCard(){
+ // Setup the vCard object.
+
vCardBegin = FALSE;
vCardEnd = FALSE;
vCardFN = FALSE;
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.
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.
wxString vCard::Get(wxString SettingName){
+ // Get values from the vCard object.
+
wxString SettingValue;
// Look for the setting name.
-
+
for (int i = 0; i < SettingCount; i++){
if (SettingNames[i] == SettingName){
vCardName vCard::GetName(){
+ // Get the name from the vCard object.
+
vCardName NameData;
ArrayvCardOutData NameArray = this->GetByPartial(wxT("N"));
//wxString NameDataGet = NameArray.PropValues[0];
ArrayvCardOutData vCard::GetByPartial(wxString SettingName){
+ // Get data from the vCard object based on a partial match.
+
ArrayvCardOutData vCardOutData;
wxArrayString SettingList;
wxString SettingValueCurrent;
wxString vCard::GetById(int id){
+ // Get data from the vCard object based on ID.
+
// Unimplemented.
return wxT("");
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;
int vCard::LoadFile(wxString LoadFilename){
+ // Load data from a file using the LoadFilename given.
+
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"));
int vCard::LoadString(wxString ContactData){
+ // Load data from a wxString.
+
ProcessString(&ContactData);
return 0;
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;
wxString vCard::WriteString(){
+ // Write the vCard file into a wxString.
+
// Open the file and begin writing data into the file.
wxString SettingName;
wxString vCard::GetFilename(){
+ // Get the filename associated with the vCard object.
+
return vCardFilename;
}
std::map<int,wxString>* vCard::GetAllCards(){
+ // Get all of vCards within the vCard object.
+
return &Cards;
}
\ No newline at end of file