diff options
author | George Hazan <george.hazan@gmail.com> | 2015-07-26 11:14:35 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-07-26 11:14:35 +0000 |
commit | 18da88d69232b5c13cb2eb7ae4e690e58d239f31 (patch) | |
tree | 6f8b23d32d53044c9ffd2ce2d62e87668ac1ef89 /include/m_ssl.h | |
parent | 4de481d21875be49d114de8cb83fa12e02685b86 (diff) |
- warning fixes;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14719 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_ssl.h')
-rw-r--r-- | include/m_ssl.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/include/m_ssl.h b/include/m_ssl.h index 9103df4a10..eb177b4ef2 100644 --- a/include/m_ssl.h +++ b/include/m_ssl.h @@ -27,20 +27,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <newpluginapi.h>
-DECLARE_HANDLE(HSSL);
-
-typedef struct
+#if !defined(HSSL_DEFINED)
+ DECLARE_HANDLE(HSSL);
+#endif
+
+typedef HSSL (__cdecl *pfnConnect)(SOCKET s, const char* host, int verify);
+typedef BOOL (__cdecl *pfnPending)(HSSL ssl);
+typedef int (__cdecl *pfnRead)(HSSL ssl, char *buf, int num, int peek);
+typedef int (__cdecl *pfnWrite)(HSSL ssl, const char *buf, int num);
+typedef void (__cdecl *pfnShutdown)(HSSL ssl);
+typedef void (__cdecl *pfnSfree)(HSSL ssl);
+
+struct SSL_API
{
int cbSize;
- HSSL ( *connect ) ( SOCKET s, const char* host, int verify );
- BOOL ( *pending ) ( HSSL ssl );
- int ( *read ) ( HSSL ssl, char *buf, int num, int peek );
- int ( *write ) ( HSSL ssl, const char *buf, int num );
- void ( *shutdown )( HSSL ssl );
- void ( *sfree ) ( HSSL ssl );
-}
- SSL_API;
+ pfnConnect connect;
+ pfnPending pending;
+ pfnRead read;
+ pfnWrite write;
+ pfnShutdown shutdown;
+ pfnSfree sfree;
+};
/* every protocol should declare this variable to use the SSL API */
extern SSL_API si;
@@ -56,7 +64,7 @@ returns TRUE if all is Ok, and FALSE otherwise #define MS_SYSTEM_GET_SI "Miranda/System/GetSslApi"
-__forceinline INT_PTR mir_getSI( SSL_API* dest )
+__forceinline INT_PTR mir_getSI(SSL_API* dest)
{
dest->cbSize = sizeof(*dest);
return CallService(MS_SYSTEM_GET_SI, 0, (LPARAM)dest);
|