00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef BIOPTR_H
00016 #define BIOPTR_H
00017
00018 #include "pandabase.h"
00019
00020
00021 #ifdef HAVE_OPENSSL
00022 #define OPENSSL_NO_KRB5
00023
00024 #include "referenceCount.h"
00025 #include "openSSLWrapper.h"
00026 #include "openssl/ssl.h"
00027
00028 class URLSpec;
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 class EXPCL_PANDAEXPRESS BioPtr : public ReferenceCount {
00040 public:
00041 INLINE BioPtr(BIO *bio);
00042 BioPtr(const URLSpec &url);
00043 virtual ~BioPtr();
00044
00045 INLINE BIO &operator *() const;
00046 INLINE BIO *operator -> () const;
00047 INLINE operator BIO * () const;
00048
00049 INLINE void set_bio(BIO *bio);
00050 INLINE BIO *get_bio() const;
00051
00052 INLINE const string &get_server_name() const;
00053 INLINE int get_port() const;
00054
00055 private:
00056 BIO *_bio;
00057 string _server_name;
00058 int _port;
00059 };
00060
00061 #include "bioPtr.I"
00062
00063 #endif // HAVE_OPENSSL
00064
00065
00066 #endif
00067
00068