00001 // ===================================================================== 00029 // ===================================================================== 00030 #ifndef __TINPUTOBJECTSOCKET_HH 00031 #define __TINPUTOBJECTSOCKET_HH 00032 00033 #include "Tglobals.h" 00034 #include "TObjectSocket.hh" 00035 #include "TInputObjectStream.hh" 00036 00037 class TStreamableObject; 00038 class TObjectFilter; 00039 class TDataRecord; 00040 class TDataSection; 00041 class TDataSegment; 00042 class TDataElement; 00043 class TInputObjectFilter; 00044 00045 00065 class TInputObjectSocket 00066 : public TObjectSocket, public TInputObjectStream 00067 { 00068 00069 private: 00070 enum { tDefaultBackLog = 5 }; 00071 00072 private: 00073 Tint theClientDescriptor; 00074 00075 public: 00076 TInputObjectSocket( Tint port = tDefaultPortNumber ); 00077 TInputObjectSocket( TInputObjectFilter* filter, Tint port = tDefaultPortNumber ); 00078 ~TInputObjectSocket(); 00079 00080 public: 00081 Tint Read( TStreamableObject& object ); 00082 00083 private: 00084 TDataRecord getDataRecord(); 00085 TDataSection getDataSection(); 00086 TDataSegment getDataSegment(); 00087 TDataElement getDataElement(); 00088 Tvoid readProperties( Tint& recsize, Tobject_t& type, Tstring& id, Tsize_t& entries ); 00089 Tvoid initialize(); 00090 00091 public: 00092 Tint GetClientDescriptor() const; 00093 // GetClientHostName() 00094 // GetClientPort() 00095 Tint OpenClient(); 00096 Tint CloseClient(); 00097 00098 }; 00099 00100 00101 inline Tint TInputObjectSocket::GetClientDescriptor() const 00102 { 00103 return theClientDescriptor; 00104 } 00105 00106 #endif