vCard ContactDatav3;
- //wxSContactFilename = Filename;
-
// Check if we are using wxWidgets version 2.8 or less and
// execute the required command accordingly.
bool QuoteMode = FALSE;
bool PropertyFind = TRUE;
- bool HasExtraNicknames = FALSE;
- bool IgnoreGender = FALSE;
bool ExtraLineSeek = TRUE;
bool BirthdayProcessed = FALSE;
bool AnniversaryProcessed = FALSE;
- bool FNProcessed = FALSE;
bool GenderProcessed = FALSE;
bool NameProcessed = FALSE;
bool KindProcessed = FALSE;
bool OrganisationFirst = FALSE;
bool NoteFirst = FALSE;
bool PhotoFirst = FALSE;
- bool LogoFirst = FALSE;
- int intExtraNickname = 0;
wxString wxSProperty;
wxString wxSPropertySeg1;
wxString wxSPropertySeg2;
wxString wxSPropertyNextLine;
size_t ContactLineLen = 0;
int QuoteBreakPoint = 0;
- int FNCount = 0;
- int NameCount = 0;
- int NicknameCount = 0;
- int ADRCount = 0;
- int EmailCount = 0;
- int IMPPCount = 0;
- int TelCount = 0;
- int LangCount = 0;
- int TZCount = 0;
- int GeoCount = 0;
- int URLCount = 0;
- int RelatedCount = 0;
- int TitleCount = 0;
- int RoleCount = 0;
- int OrgCount = 0;
- int NoteCount = 0;
- int CategoryCount = 0;
- int PhotoCount = 0;
- int LogoCount = 0;
- int SoundCount = 0;
- int CalAdrCount = 0;
- int CalReqAdrCount = 0;
- int FreeBusyCount = 0;
- int KeyCount = 0;
- int VendorCount = 0;
- int XTokenCount = 0;
int ItemSeek = 1;
- //int intValueSeek = 1;
wxString strVer;
- // Setup the version string.
+ // Setup the version string.
strVer.Append(wxT("-//Xestia//Address Book Version "));
strVer.Append(wxT(XSDAB_VERSION));
if (wxSPropertyNextLine.Mid(0, 1) == wxT(" ") || wxSPropertyNextLine.Mid(0, 1) == wxT("\t")){
wxSPropertyNextLine.Remove(0, 1);
- //wxSPropertyNextLine.Trim(FALSE);
- //ContactLine.Trim();
ContactLine.Append(wxSPropertyNextLine);
} else {
wxString PropertyValue;
wxString PropertyTokens;
int intPrevValue = 4;
-
- //SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
intPrevValue = 3;
wxString PropertyName;
wxString PropertyValue;
wxString PropertyTokens;
- int intPrevValue = 5;
-
- intPrevValue = 4;
ContactDatav3.AddRaw(wxT("X-ADDRESSBOOKSERVER-KIND"), wxSPropertySeg2);
wxString PropertyName;
wxString PropertyValue;
wxString PropertyTokens;
- int intPrevValue = 7;
-
- intPrevValue = 6;
ContactDatav3.AddRaw(wxT("X-ADDRESSBOOKSERVER-MEMBER"), wxSPropertySeg2);
int intSplitsFound = 0;
int intSplitSize = 0;
int intPrevValue = 5;
- int intType = 0;
int intSplitPoint = 0;
intPrevValue = 4;
TelTypeUI.Append(wxT(","));
}
-
- if (TypePropertyName == wxT("home")){
-
- intType = 1;
-
- } else if (TypePropertyName == wxT("work")){
-
- intType = 2;
-
- }
if (TypePropertyName == wxT("text")){
} else if (TypePropertyName == wxT("textphone")){
- //if (!TelTypeOut.IsEmpty()){ TelTypeOut.Append(wxT(";")); }
-
if (!FinalFriendlyString.IsEmpty()){ FinalFriendlyString.Append(_(", Textphone")); } else { FinalFriendlyString.Append(_("Textphone")); }
TelTypeOut.Append(wxT(";"));
size_t intPrevValue = (wxSProperty.Len() + 1);
- if (((QuoteBreakPoint + 1) - intPrevValue) <= 0){
+ if (((QuoteBreakPoint + 1) - intPrevValue) <= 0){
- ContactDatav3.AddRaw(wxSProperty, wxSPropertySeg2);
+ ContactDatav3.AddRaw(wxSProperty, wxSPropertySeg2);
- } else {
+ } else {
- ContactDatav3.AddRaw(wxSProperty + wxT(";") + ContactLine.Mid(intPrevValue, ((QuoteBreakPoint + 1) - (intPrevValue + 1))), wxSPropertySeg2);
+ ContactDatav3.AddRaw(wxSProperty + wxT(";") + ContactLine.Mid(intPrevValue, ((QuoteBreakPoint + 1) - (intPrevValue + 1))), wxSPropertySeg2);
- }
+ }
+
+ } else if (wxSProperty.Mid(0, 12) == wxT("CLIENTPIDMAP")){
+
+ // Process the Client PID maps.
+
+ int intPrevValue = 14;
+
+ intPrevValue = 12;
+ if (((QuoteBreakPoint + 1) - intPrevValue) <= 0){
+
+ ContactDatav3.AddRaw(wxT("X-VCARD4-CLIENTPIDMAP"), wxSPropertySeg2);
+
+ } else {
+
+ ContactDatav3.AddRaw(wxT("X-VCARD4-CLIENTPIDMAP;") + ContactLine.Mid(intPrevValue, ((QuoteBreakPoint + 1) - (intPrevValue + 1))), wxSPropertySeg2);
+
+ }
+
+ } else if (wxSProperty.Mid(0, 3) == wxT("XML")){
+
+ // Process the XML values.
+
+ int intPrevValue = 5;
+
+ intPrevValue = 3;
+
+ if (((QuoteBreakPoint + 1) - intPrevValue) <= 0){
+
+ ContactDatav3.AddRaw(wxT("X-VCARD4-XML"), wxSPropertySeg2);
+
+ } else {
+
+ ContactDatav3.AddRaw(wxT("X-VCARD4-XML;") + ContactLine.Mid(intPrevValue, ((QuoteBreakPoint + 1) - (intPrevValue + 1))), wxSPropertySeg2);
+
+ }
+
+ } else if (wxSProperty.Mid(0, 6) == wxT("SOURCE")){
+
+ // Process the source links.
+
+ int intPrevValue = 8;
+
+ intPrevValue = 6;
+
+ if (((QuoteBreakPoint + 1) - intPrevValue) <= 0){
+
+ ContactDatav3.AddRaw(wxT("X-VCARD4-SOURCE"), wxSPropertySeg2);
+
+ } else {
+
+ ContactDatav3.AddRaw(wxT("X-VCARD4-SOURCE;") + ContactLine.Mid(intPrevValue, ((QuoteBreakPoint + 1) - (intPrevValue + 1))), wxSPropertySeg2);
+
+ }
+
}
// Reset the variables.