00001 // Filename: bioStreamPtr.h 00002 // Created by: drose (15Oct02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #ifndef BIOSTREAMPTR_H 00020 #define BIOSTREAMPTR_H 00021 00022 #include "pandabase.h" 00023 00024 // This module is not compiled if OpenSSL is not available. 00025 #ifdef HAVE_SSL 00026 00027 #include "bioStream.h" 00028 #include "referenceCount.h" 00029 #include <openssl/ssl.h> 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Class : BioStreamPtr 00033 // Description : A wrapper around an BioStream object to make a 00034 // reference-counting pointer to it. 00035 //////////////////////////////////////////////////////////////////// 00036 class EXPCL_PANDAEXPRESS BioStreamPtr : public ReferenceCount { 00037 public: 00038 INLINE BioStreamPtr(BioStream *stream); 00039 virtual ~BioStreamPtr(); 00040 00041 INLINE BioStream &operator *() const; 00042 INLINE BioStream *operator -> () const; 00043 INLINE operator BioStream * () const; 00044 00045 INLINE void set_stream(BioStream *stream); 00046 INLINE BioStream *get_stream() const; 00047 00048 bool connect() const; 00049 00050 private: 00051 BioStream *_stream; 00052 }; 00053 00054 #include "bioStreamPtr.I" 00055 00056 #endif // HAVE_SSL 00057 00058 00059 #endif 00060 00061