diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-04-20 10:14:05 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-04-20 10:14:05 +0000 |
commit | 5560fccb85a89bb668a79eed3d4cd0e668278331 (patch) | |
tree | a8c5949d9cc473c51af2712bb79c306f4a531932 /protocols/Skype/src/skype_account.cpp | |
parent | 5a5ffa5cc195669c48827e4cf9d948dfb3272e47 (diff) |
- temporary commit. may contain non-working code
git-svn-id: http://svn.miranda-ng.org/main/trunk@4480 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_account.cpp')
-rw-r--r-- | protocols/Skype/src/skype_account.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_account.cpp b/protocols/Skype/src/skype_account.cpp index 3bbf06bab3..6453e5e166 100644 --- a/protocols/Skype/src/skype_account.cpp +++ b/protocols/Skype/src/skype_account.cpp @@ -159,4 +159,25 @@ bool CSkypeProto::SignIn(int status) }
return false;
+}
+
+bool CSkypeProto::IsAvatarChanged(const SEBinary &avatar)
+{
+ bool result = false;
+
+ ::mir_md5_byte_t digest[16];
+ ::mir_md5_hash((PBYTE)avatar.data(), avatar.size(), digest);
+
+ DBVARIANT dbv;
+ ::db_get(NULL, this->m_szModuleName, "AvatarHash", &dbv);
+ if (dbv.type == DBVT_BLOB && dbv.pbVal && dbv.cpbVal == 16)
+ {
+ if (::memcmp(digest, dbv.pbVal, 16) == 0)
+ {
+ result = true;
+ }
+ }
+ ::db_free(&dbv);
+
+ return result;
}
\ No newline at end of file |