diff options
| author | George Hazan <ghazan@miranda.im> | 2020-03-30 10:33:31 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2020-03-30 10:33:31 +0300 |
| commit | d14e2b59f51177dc421b50cfb757d27fba7b6cf9 (patch) | |
| tree | 94683316e2c20801cc8aab9efcff5c6506fdf1e6 /protocols/SkypeWeb/src/requests/asm | |
| parent | 779945c5335408fa8131654b11d0bc4ba8ee4288 (diff) | |
SkypeWeb: fix for vcxproj file
Diffstat (limited to 'protocols/SkypeWeb/src/requests/asm')
| -rw-r--r-- | protocols/SkypeWeb/src/requests/asm/files.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/protocols/SkypeWeb/src/requests/asm/files.h b/protocols/SkypeWeb/src/requests/asm/files.h deleted file mode 100644 index c5bcf7373a..0000000000 --- a/protocols/SkypeWeb/src/requests/asm/files.h +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once
-
-class ASMObjectCreateRequest : public HttpRequest
-{
-public:
- ASMObjectCreateRequest(CSkypeProto *ppro, const char *szContact, const char *szFileName) :
- HttpRequest(REQUEST_POST, "api.asm.skype.com/v1/objects")
- {
- flags &= (~NLHRF_DUMPASTEXT);
- Headers
- << FORMAT_VALUE("Authorization", "skype_token %s", ppro->m_szApiToken.get())
- << CHAR_VALUE("Content-Type", "text/json")
- << CHAR_VALUE("X-Client-Version", "0/0.0.0.0");
-
- JSONNode node, jPermissions, jPermission(JSON_ARRAY);
- jPermissions.set_name("permissions");
- jPermission.set_name(szContact);
- jPermission << JSONNode("", "read");
- jPermissions << jPermission;
- node << JSONNode("type", "sharing/file") << JSONNode("filename", szFileName) << jPermissions;
-
- Body << VALUE(node.write().c_str());
- }
-};
-
-class ASMObjectUploadRequest : public HttpRequest
-{
-public:
- ASMObjectUploadRequest(CSkypeProto *ppro, const char *szObject, const PBYTE data, const size_t size) :
- HttpRequest(REQUEST_PUT, FORMAT, "api.asm.skype.com/v1/objects/%s/content/original", szObject)
- {
- Headers
- << FORMAT_VALUE("Authorization", "skype_token %s", ppro->m_szApiToken.get())
- << CHAR_VALUE("Content-Type", "application/octet-stream");
-
- pData = (char*)mir_alloc(size);
- memcpy(pData, data, size);
- dataLength = (int)size;
-
- }
- ~ASMObjectUploadRequest()
- {
- mir_free(pData);
- }
-};
|
