diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-11-13 18:26:40 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-11-13 18:26:40 +0000 |
commit | 85c9a8f36922b56fcf9b42842dfe37902b028ce0 (patch) | |
tree | 9d09243e829f278764f8a73600eaa47b4f3016bc /protocols/SkypeWeb | |
parent | 7b5190da46bf7ed59c78cc1d521a32cf82db870e (diff) |
SkypeWeb: images uploading support (part 1)
git-svn-id: http://svn.miranda-ng.org/main/trunk@15718 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/SkypeWeb.vcxproj | 1 | ||||
-rw-r--r-- | protocols/SkypeWeb/SkypeWeb.vcxproj.filters | 3 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/http_request.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_contacts.cpp | 1 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.h | 13 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/stdafx.h | 2 |
6 files changed, 15 insertions, 7 deletions
diff --git a/protocols/SkypeWeb/SkypeWeb.vcxproj b/protocols/SkypeWeb/SkypeWeb.vcxproj index ee2dfac381..65211f175a 100644 --- a/protocols/SkypeWeb/SkypeWeb.vcxproj +++ b/protocols/SkypeWeb/SkypeWeb.vcxproj @@ -47,5 +47,6 @@ <ClInclude Include="src\requests\subscriptions.h" />
<ClInclude Include="src\requests\trouter.h" />
<ClInclude Include="src\requests\mslogin.h" />
+ <ClInclude Include="src\requests\asm\images.h" />
</ItemGroup>
</Project>
\ No newline at end of file diff --git a/protocols/SkypeWeb/SkypeWeb.vcxproj.filters b/protocols/SkypeWeb/SkypeWeb.vcxproj.filters index 3c54e2e212..15498fe4c2 100644 --- a/protocols/SkypeWeb/SkypeWeb.vcxproj.filters +++ b/protocols/SkypeWeb/SkypeWeb.vcxproj.filters @@ -5,6 +5,9 @@ <Filter Include="Header Files\requests">
<UniqueIdentifier>{957f1f93-0eaa-46b2-8f18-5df27d47239e}</UniqueIdentifier>
</Filter>
+ <Filter Include="Header Files\requests\ASM">
+ <UniqueIdentifier>{f7da484c-5d63-4472-8236-1671da5c9a55}</UniqueIdentifier>
+ </Filter>
<Filter Include="Resource Files\Icons">
<UniqueIdentifier>{5FAEFAD1-A7C5-452F-A497-4ECA0C2D0CDA}</UniqueIdentifier>
<Extensions>ico;cur;bmp;gif;jpg;jpeg</Extensions>
diff --git a/protocols/SkypeWeb/src/http_request.h b/protocols/SkypeWeb/src/http_request.h index 4fc62c02b7..90d552358c 100644 --- a/protocols/SkypeWeb/src/http_request.h +++ b/protocols/SkypeWeb/src/http_request.h @@ -240,6 +240,7 @@ public: cbSize = sizeof(NETLIBHTTPREQUEST);
flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_DUMPASTEXT;
requestType = type;
+ pData = NULL;
}
HttpRequest(int type, HttpRequestUrlFormat, LPCSTR urlFormat, ...)
@@ -249,6 +250,7 @@ public: flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_DUMPASTEXT;
requestType = type;
va_end(formatArgs);
+ pData = NULL;
}
~HttpRequest()
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index 81bcc6bc2f..68b98f3ca1 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -87,6 +87,7 @@ MCONTACT CSkypeProto::FindContact(const char *skypename) MCONTACT CSkypeProto::AddContact(const char *skypename, bool isTemporary)
{
MCONTACT hContact = FindContact(skypename);
+
if (!hContact)
{
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
diff --git a/protocols/SkypeWeb/src/skype_utils.h b/protocols/SkypeWeb/src/skype_utils.h index e9c1275334..34c2324dda 100644 --- a/protocols/SkypeWeb/src/skype_utils.h +++ b/protocols/SkypeWeb/src/skype_utils.h @@ -80,13 +80,12 @@ class EventHandle {
HANDLE _hEvent;
public:
- inline EventHandle() { _hEvent = CreateEvent(NULL, 0, 0, NULL); }
- inline ~EventHandle() { CloseHandle(_hEvent); }
- inline void Set() { SetEvent(_hEvent); }
- inline void Wait() { WaitForSingleObject(_hEvent, INFINITE); }
- inline void Wait(DWORD dwMilliseconds) { WaitForSingleObject(_hEvent, dwMilliseconds); }
- inline operator HANDLE() { return _hEvent; }
+ __inline explicit EventHandle() { _hEvent = CreateEvent(NULL, 0, 0, NULL); }
+ __inline explicit EventHandle(HANDLE hEvent) : _hEvent(hEvent) {}
+ __inline ~EventHandle() { CloseHandle(_hEvent); }
+ __inline void Set() { SetEvent(_hEvent); }
+ __inline void Wait(DWORD dwMilliseconds = INFINITE) { WaitForSingleObject(_hEvent, dwMilliseconds); }
+ __inline operator HANDLE() { return _hEvent; }
};
-
#endif //_UTILS_H_
\ No newline at end of file diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h index 78f57f9d37..8c9b9563f2 100644 --- a/protocols/SkypeWeb/src/stdafx.h +++ b/protocols/SkypeWeb/src/stdafx.h @@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <vector>
#include <regex>
#include <map>
+#include <memory>
#include <newpluginapi.h>
@@ -124,6 +125,7 @@ struct MessageId #include "requests\chatrooms.h"
#include "requests\trouter.h"
#include "requests\mslogin.h"
+#include "requests\asm\images.h"
#include "request_queue.h"
#include "skype_proto.h"
|