|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/connect/ncbi_connssl.h |
source navigation diff markup identifier search freetext search file search |
1 #ifndef CONNECT___NCBI_CONNSSL__H
2 #define CONNECT___NCBI_CONNSSL__H
3
4 /* $Id: ncbi_connssl.h,v 1.1 2008/10/16 20:14:14 lavr Exp $
5 * ===========================================================================
6 *
7 * PUBLIC DOMAIN NOTICE
8 * National Center for Biotechnology Information
9 *
10 * This software/database is a "United States Government Work" under the
11 * terms of the United States Copyright Act. It was written as part of
12 * the author's official duties as a United States Government employee and
13 * thus cannot be copyrighted. This software/database is freely available
14 * to the public for use. The National Library of Medicine and the U.S.
15 * Government have not placed any restriction on its use or reproduction.
16 *
17 * Although all reasonable efforts have been taken to ensure the accuracy
18 * and reliability of the software and data, the NLM and the U.S.
19 * Government do not and cannot warrant the performance or results that
20 * may be obtained by using this software or data. The NLM and the U.S.
21 * Government disclaim all warranties, express or implied, including
22 * warranties of performance, merchantability or fitness for any particular
23 * purpose.
24 *
25 * Please cite the author in any work or product based on this material.
26 *
27 * ===========================================================================
28 *
29 * Author: Anton Lavrentiev
30 *
31 * @file
32 * File Description:
33 * Formal and dataless ("pure virtual") definition of a simple SSL API.
34 *
35 */
36
37 #include "ncbi_socketp.h"
38
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44
45 typedef EIO_Status (*FSSLPull) (SOCK sock, void* buf, size_t size,
46 size_t* done, int/*bool*/ logdata);
47 typedef EIO_Status (*FSSLPush) (SOCK sock, const void* data, size_t size,
48 size_t* done, int/*bool*/ logdata);
49
50
51 typedef EIO_Status (*FSSLInit) (FSSLPull pull, FSSLPush push);
52 typedef void* (*FSSLCreate)(ESOCK_Side side, SOCK sock, int* error);
53 typedef EIO_Status (*FSSLOpen) (void* session, int* error);
54 typedef EIO_Status (*FSSLRead) (void* session, void* buf, size_t size,
55 size_t* done, int* error);
56 typedef EIO_Status (*FSSLWrite) (void* session, const void* data, size_t size,
57 size_t* done, int* error);
58 typedef EIO_Status (*FSSLClose) (void* session, int how, int* error);
59 typedef void (*FSSLDelete)(void* session);
60 typedef void (*FSSLExit) (void);
61 typedef const char* (*FSSLError) (void* session, int error);
62
63
64 /* Table of "virtual functions"
65 */
66 struct SOCKSSL_struct {
67 FSSLInit Init;
68 FSSLCreate Create;
69 FSSLOpen Open;
70 FSSLRead Read;
71 FSSLWrite Write;
72 FSSLClose Close;
73 FSSLDelete Delete;
74 FSSLExit Exit;
75 FSSLError Error;
76 };
77
78
79 #ifdef __cplusplus
80 } /* extern "C" */
81 #endif
82
83
84 /* @} */
85
86 #endif /* CONNECT___NCBI_CONNSSL__H */
87 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |