diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-05-30 19:52:45 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-05-30 19:52:45 +0000 |
commit | 4175d475a610d2ed581116a960a77df4efe6890d (patch) | |
tree | 5a047e53ad47893793f40170c5b447f4724bf94a /plugins/Dropbox/src/http_request.h | |
parent | 6c764151d2fbb2b6ecfdd68bcd48b86e36a773df (diff) |
Dropbox:
- fixed contact creation after auth
- more correct way to release response object
- version bumb
git-svn-id: http://svn.miranda-ng.org/main/trunk@13910 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/http_request.h')
-rw-r--r-- | plugins/Dropbox/src/http_request.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/plugins/Dropbox/src/http_request.h b/plugins/Dropbox/src/http_request.h index 9980945b66..dc0c006b47 100644 --- a/plugins/Dropbox/src/http_request.h +++ b/plugins/Dropbox/src/http_request.h @@ -31,7 +31,7 @@ public: }
};
-class HttpRequest : protected NETLIBHTTPREQUEST//, public MZeroedObject
+class HttpRequest : protected NETLIBHTTPREQUEST
{
private:
CMStringA m_szUrl;
@@ -163,4 +163,26 @@ public: }
};
+class NetlibPtr
+{
+protected:
+ NETLIBHTTPREQUEST *_p;
+
+public:
+ __inline explicit NetlibPtr(NETLIBHTTPREQUEST *p) : _p(p) {}
+ __inline NETLIBHTTPREQUEST* operator=(NETLIBHTTPREQUEST *p)
+ {
+ if (p)
+ CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)(NETLIBHTTPREQUEST*)p);
+ _p = p;
+ return _p;
+ }
+ __inline operator NETLIBHTTPREQUEST*() const { return _p; }
+ __inline NETLIBHTTPREQUEST* operator->() const { return _p; }
+ __inline ~NetlibPtr()
+ {
+ CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)(NETLIBHTTPREQUEST*)this);
+ }
+};
+
#endif //_HTTP_REQUEST_H_
\ No newline at end of file |