diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.cpp | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index df55850287..b5c32361f8 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -309,7 +309,7 @@ private: MEVENT AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob);
time_t IsoToUnixTime(const char *stamp);
char *RemoveHtml(const char *text);
- char *GetStringChunk(const char *haystack, size_t len, const char *start, const char *end);
+ CMStringA GetStringChunk(const char *haystack, const char *start, const char *end);
int SkypeToMirandaStatus(const char *status);
char *MirandaToSkypeStatus(int status);
@@ -335,7 +335,7 @@ private: void CALLBACK SkypeSetTimer(void*);
time_t GetLastMessageTime(MCONTACT hContact);
-
+ CMString RunConfirmationCode();
//events
void InitDBEvents();
int __cdecl ProcessSrmmEvent(WPARAM, LPARAM);
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index bfc4cc3bdd..7417673315 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -539,6 +539,19 @@ CMStringA CSkypeProto::ParseUrl(const char *url, const char *token) return CMStringA(start, end - start);
}
+CMStringA CSkypeProto::GetStringChunk(const char *haystack, const char *start, const char *end)
+{
+ const char *sstart = strstr(haystack, start);
+ if (sstart == NULL)
+ return CMStringA();
+
+ sstart = sstart + mir_strlen(start);
+ const char *send = strstr(sstart, end);
+ if (send == NULL)
+ return CMStringA(sstart);
+ return CMStringA(sstart, send - sstart);
+}
+
CMStringA CSkypeProto::ContactUrlToName(const char *url)
{
return ParseUrl(url, "/8:");
|