aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/openssl/holders/bio.h
blob: bcd6a7a9d662fa18068ad688d5bcad822b335830 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <contrib/libs/openssl/include/openssl/bio.h>

#include <library/cpp/openssl/holders/holder.h>

namespace NOpenSSL {

class TBioMethod : public THolder<BIO_METHOD, BIO_meth_new, BIO_meth_free, int, const char*> {
public:
    TBioMethod(
        int type,
        const char* name,
        int (*write)(BIO*, const char*, int),
        int (*read)(BIO*, char*, int),
        int (*puts)(BIO*, const char*),
        int (*gets)(BIO*, char*, int),
        long (*ctrl)(BIO*, int, long, void*),
        int (*create)(BIO*),
        int (*destroy)(BIO*),
        long (*callbackCtrl)(BIO*, int, bio_info_cb*)
    );
};

} // namespace NOpenSSL