diff options
Diffstat (limited to 'protocols/SkypeWeb/src/http_request.h')
-rw-r--r-- | protocols/SkypeWeb/src/http_request.h | 22 |
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 |