summaryrefslogtreecommitdiffabout
path: root/gammu/emb
authorzautrix <zautrix>2004-10-10 16:00:04 (UTC)
committer zautrix <zautrix>2004-10-10 16:00:04 (UTC)
commitee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a (patch) (unidiff)
tree1d908bfc23b8a49d43a58bbeadd82c4e08faeff6 /gammu/emb
parent213a9d993e5a4751b64e18320cfbebb000681d13 (diff)
downloadkdepimpi-ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a.zip
kdepimpi-ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a.tar.gz
kdepimpi-ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a.tar.bz2
many phone AB sync fixes
Diffstat (limited to 'gammu/emb') (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/common/service/gsmmisc.c4
-rw-r--r--gammu/emb/common/service/gsmpbk.c17
-rw-r--r--gammu/emb/gammu/gammu.c2
3 files changed, 12 insertions, 11 deletions
diff --git a/gammu/emb/common/service/gsmmisc.c b/gammu/emb/common/service/gsmmisc.c
index 6959a22..1c6ec8b 100644
--- a/gammu/emb/common/service/gsmmisc.c
+++ b/gammu/emb/common/service/gsmmisc.c
@@ -202,11 +202,11 @@ void SaveVCALText(char *Buffer, int *Length, char *Text, char *Start)
202 char buffer[1000]; 202 char buffer[1000];
203 203
204 if (UnicodeLength(Text) != 0) { 204 if (UnicodeLength(Text) != 0) {
205 EncodeUTF8QuotedPrintable(buffer,Text); 205 EncodeUTF8(buffer,Text);
206 if (UnicodeLength(Text)==strlen(buffer)) { 206 if (UnicodeLength(Text)==strlen(buffer)) {
207 *Length+=sprintf(Buffer+(*Length), "%s:%s%c%c",Start,DecodeUnicodeString(Text),13,10); 207 *Length+=sprintf(Buffer+(*Length), "%s:%s%c%c",Start,DecodeUnicodeString(Text),13,10);
208 } else { 208 } else {
209 *Length+=sprintf(Buffer+(*Length), "%s;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:%s%c%c",Start,buffer,13,10); 209 *Length+=sprintf(Buffer+(*Length), "%s:%s%c%c",Start,buffer,13,10);
210 } 210 }
211 } 211 }
212} 212}
diff --git a/gammu/emb/common/service/gsmpbk.c b/gammu/emb/common/service/gsmpbk.c
index 05e5cb9..f7cf7d7 100644
--- a/gammu/emb/common/service/gsmpbk.c
+++ b/gammu/emb/common/service/gsmpbk.c
@@ -131,27 +131,27 @@ void GSM_EncodeVCARD(char *Buffer, int *Length, GSM_MemoryEntry *pbk, bool heade
131 break; 131 break;
132 case PBK_Number_General : 132 case PBK_Number_General :
133 *Length+=sprintf(Buffer+(*Length),"TEL"); 133 *Length+=sprintf(Buffer+(*Length),"TEL");
134 if (Number == i) (*Length)+=sprintf(Buffer+(*Length),";PREF"); 134 (*Length)+=sprintf(Buffer+(*Length),";PREF");
135 break; 135 break;
136 case PBK_Number_Mobile : 136 case PBK_Number_Mobile :
137 *Length+=sprintf(Buffer+(*Length),"TEL"); 137 *Length+=sprintf(Buffer+(*Length),"TEL");
138 if (Number == i) (*Length)+=sprintf(Buffer+(*Length),";PREF"); 138 //if (Number == i) (*Length)+=sprintf(Buffer+(*Length),";PREF");
139 *Length+=sprintf(Buffer+(*Length),";CELL"); 139 *Length+=sprintf(Buffer+(*Length),";CELL");
140 break; 140 break;
141 case PBK_Number_Work : 141 case PBK_Number_Work :
142 *Length+=sprintf(Buffer+(*Length),"TEL"); 142 *Length+=sprintf(Buffer+(*Length),"TEL");
143 if (Number == i) (*Length)+=sprintf(Buffer+(*Length),";PREF"); 143 //if (Number == i) (*Length)+=sprintf(Buffer+(*Length),";PREF");
144 *Length+=sprintf(Buffer+(*Length),";WORK;VOICE"); 144 *Length+=sprintf(Buffer+(*Length),";WORK");
145 break; 145 break;
146 case PBK_Number_Fax : 146 case PBK_Number_Fax :
147 *Length+=sprintf(Buffer+(*Length),"TEL"); 147 *Length+=sprintf(Buffer+(*Length),"TEL");
148 if (Number == i) (*Length)+=sprintf(Buffer+(*Length),";PREF"); 148 //if (Number == i) (*Length)+=sprintf(Buffer+(*Length),";PREF");
149 *Length+=sprintf(Buffer+(*Length),";FAX"); 149 *Length+=sprintf(Buffer+(*Length),";FAX");
150 break; 150 break;
151 case PBK_Number_Home : 151 case PBK_Number_Home :
152 *Length+=sprintf(Buffer+(*Length),"TEL"); 152 *Length+=sprintf(Buffer+(*Length),"TEL");
153 if (Number == i) (*Length)+=sprintf(Buffer+(*Length),";PREF"); 153 //if (Number == i) (*Length)+=sprintf(Buffer+(*Length),";PREF");
154 *Length+=sprintf(Buffer+(*Length),";HOME;VOICE"); 154 *Length+=sprintf(Buffer+(*Length),";HOME");
155 break; 155 break;
156 case PBK_Text_Note : 156 case PBK_Text_Note :
157 *Length+=sprintf(Buffer+(*Length),"NOTE"); 157 *Length+=sprintf(Buffer+(*Length),"NOTE");
@@ -160,7 +160,7 @@ void GSM_EncodeVCARD(char *Buffer, int *Length, GSM_MemoryEntry *pbk, bool heade
160 /* Don't ask why. Nokia phones save postal address 160 /* Don't ask why. Nokia phones save postal address
161 * double - once like LABEL, second like ADR 161 * double - once like LABEL, second like ADR
162 */ 162 */
163 SaveVCALText(Buffer, Length, pbk->Entries[i].Text, "LABEL"); 163 //SaveVCALText(Buffer, Length, pbk->Entries[i].Text, "LABEL");
164 *Length+=sprintf(Buffer+(*Length),"ADR"); 164 *Length+=sprintf(Buffer+(*Length),"ADR");
165 break; 165 break;
166 case PBK_Text_Email : 166 case PBK_Text_Email :
@@ -179,6 +179,7 @@ void GSM_EncodeVCARD(char *Buffer, int *Length, GSM_MemoryEntry *pbk, bool heade
179 } 179 }
180 } 180 }
181 } 181 }
182 *Length+=sprintf(Buffer+(*Length), "X-KADDRESSBOOK-X-ExternalID:%d%c%c",pbk->Location,13,10);
182 if (header) *Length+=sprintf(Buffer+(*Length),"END:VCARD%c%c",13,10); 183 if (header) *Length+=sprintf(Buffer+(*Length),"END:VCARD%c%c",13,10);
183 } 184 }
184} 185}
diff --git a/gammu/emb/gammu/gammu.c b/gammu/emb/gammu/gammu.c
index 8db9afb..684e67c 100644
--- a/gammu/emb/gammu/gammu.c
+++ b/gammu/emb/gammu/gammu.c
@@ -4686,7 +4686,7 @@ static void Restore(int argc, char *argv[])
4686 max = 0; 4686 max = 0;
4687 while (Backup.PhonePhonebook[max]!=NULL) max++; 4687 while (Backup.PhonePhonebook[max]!=NULL) max++;
4688 printmsgerr("%i entries in backup file\n",max); 4688 printmsgerr("%i entries in backup file\n",max);
4689 if (answer_yes("Restore phone phonebook")) DoRestore = true; 4689 /* LR if (answer_yes("Restore phone phonebook")) */DoRestore = true;
4690 } 4690 }
4691 } 4691 }
4692 if (DoRestore) { 4692 if (DoRestore) {