Panda3D
 All Classes Functions Variables Enumerations
bioStreamPtr.h
00001 // Filename: bioStreamPtr.h
00002 // Created by:  drose (15Oct02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef BIOSTREAMPTR_H
00016 #define BIOSTREAMPTR_H
00017 
00018 #include "pandabase.h"
00019 
00020 // This module is not compiled if OpenSSL is not available.
00021 #ifdef HAVE_OPENSSL
00022 #define OPENSSL_NO_KRB5
00023 
00024 #include "bioStream.h"
00025 #include "referenceCount.h"
00026 #include "openSSLWrapper.h"  // must be included before any other openssl.
00027 #include "openssl/ssl.h"
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //       Class : BioStreamPtr
00031 // Description : A wrapper around an BioStream object to make a
00032 //               reference-counting pointer to it.
00033 ////////////////////////////////////////////////////////////////////
00034 class EXPCL_PANDAEXPRESS BioStreamPtr : public ReferenceCount {
00035 public:
00036   INLINE BioStreamPtr(BioStream *stream);
00037   virtual ~BioStreamPtr();
00038 
00039   INLINE BioStream &operator *() const;
00040   INLINE BioStream *operator -> () const;
00041   INLINE operator BioStream * () const;
00042 
00043   INLINE void set_stream(BioStream *stream);
00044   INLINE BioStream *get_stream() const;
00045 
00046 private:
00047   BioStream *_stream;
00048 };
00049 
00050 #include "bioStreamPtr.I"
00051 
00052 #endif  // HAVE_OPENSSL
00053 
00054 
00055 #endif
00056 
00057 
 All Classes Functions Variables Enumerations