summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/http_request.h
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-06-07 18:54:38 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-06-07 18:54:38 +0000
commit5d6989883de96e8f0f369dfb8af549963638ac61 (patch)
tree8fe86f09740268821624c26a6b969c1e2de946c0 /protocols/SkypeWeb/src/http_request.h
parente5cb033463036b182fb6e5e3eed50a14987f5300 (diff)
SkypeWeb: Search -> UTF-8. Code optimization.
git-svn-id: http://svn.miranda-ng.org/main/trunk@14055 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/http_request.h')
-rw-r--r--protocols/SkypeWeb/src/http_request.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/http_request.h b/protocols/SkypeWeb/src/http_request.h
index f12a5111b1..363ff6ec87 100644
--- a/protocols/SkypeWeb/src/http_request.h
+++ b/protocols/SkypeWeb/src/http_request.h
@@ -264,4 +264,26 @@ public:
}
};
+class NLHR_PTR
+{
+protected:
+ NETLIBHTTPREQUEST *_p;
+
+public:
+ __inline explicit NLHR_PTR(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 ~NLHR_PTR()
+ {
+ CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)(NETLIBHTTPREQUEST*)this);
+ }
+};
+
#endif //_HTTP_REQUEST_H_ \ No newline at end of file