PageRenderTime 21ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/include/m_ssl.inc

http://delphi-miranda-plugins.googlecode.com/
Pascal | 55 lines | 15 code | 6 blank | 34 comment | 0 complexity | b7d29afe15247f183c812a432f4c1f40 MD5 | raw file
  1. {
  2. Miranda IM: the free IM client for Microsoft* Windows*
  3. Copyright 2000-2008 Miranda ICQ/IM project,
  4. all portions of this codebase are copyrighted to the people
  5. listed in contributors.txt.
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. }
  18. {$IFNDEF M_SSL}
  19. {$DEFINE M_SSL}
  20. type
  21. HSSL = THANDLE;
  22. TSOCKET = uint_ptr; // from Winsock.pas
  23. type
  24. TSSL_API = record
  25. cbSize:int;
  26. connect : function(s:TSOCKET; const host:PAnsiChar; verify:int):HSSL; cdecl;
  27. pending : function(ssl:HSSL):bool; cdecl;
  28. read : function(ssl:HSSL; buf:PAnsiChar; num:int; peek:int):int; cdecl;
  29. write : function(ssl:HSSL; const buf:PAnsiChar; num:int):int; cdecl;
  30. shutdown : procedure(ssl:HSSL); cdecl;
  31. sfree : procedure(ssl:HSSL); cdecl;
  32. end;
  33. // every protocol should declare this variable to use the SSL API
  34. // extern SSL_API si;
  35. {
  36. a service to obtain the SSL API
  37. wParam = 0;
  38. lParam = (LPARAM)(SSL_API*).
  39. returns TRUE if all is Ok, and FALSE otherwise
  40. }
  41. const
  42. MS_SYSTEM_GET_SI:PAnsiChar = 'Miranda/System/GetSslApi';
  43. {$ENDIF}