00001 #ifndef __CHM_LLP_SERVER_H__ 00002 #define __CHM_LLP_SERVER_H__ 00003 //-------------------------------------------------------------------------- 00004 // Copyright (C) 1997-2009 iNTERFACEWARE Inc. All Rights Reserved. 00005 // 00006 // Class: CHMllpServer 00007 // 00008 // Description: 00009 // 00010 // Class interface definition. 00011 // 00012 // This file is automatically generated. 00013 // DO NOT EDIT. 00014 // 00015 // Author: codegen2 00016 // Date: Tuesday, August 11th, 2009 @ 05:32:24 PM 00017 // Revision: $Revision: 1.6 $ 00018 // 00019 // Last Edit Date: $Date: 2010-03-22 21:47:20 $ 00020 // Source: $Source: /home/cvs/cvsroot/CHM/CHMllpServer.h,v $ 00021 //-------------------------------------------------------------------------- 00022 00023 #include <CHM/CHMminimumInclude.h> 00024 // Predeclared Classes 00025 class CHMllpConnection; 00026 00027 00028 #ifndef __CHM_LISTENER_HANDLE_H__ 00029 #define __CHM_LISTENER_HANDLE_H__ 00030 typedef void* CHMlistenerHandle; 00031 #endif 00032 00033 00046 class CHMllpServer 00047 { 00048 public: 00050 CHMllpServer(); 00051 00053 virtual ~CHMllpServer(); 00054 00056 CHMlistenerHandle GetHandle() const { return Handle; } 00057 00058 00063 CHMint32 Port() const; 00064 00065 00078 const char* Host() const; 00079 00080 00088 void SetHost(const char* Value); 00089 00090 00102 const char* HeaderBlock() const; 00103 00104 00112 void SetHeaderBlock(const char* Value); 00113 00114 00127 const char* TrailerBlock() const; 00128 00129 00137 void SetTrailerBlock(const char* Value); 00138 00139 00149 CHMboolean IsListening() const; 00150 00151 00169 CHMllpConnection Client(CHMint32 ClientIndex) const; 00170 00171 00178 CHMint32 CountOfClient() const; 00179 00180 00190 void StopMessageLoop(); 00191 00192 00211 static void RunMessageLoop(); 00212 00213 00232 void StartListen(CHMint32 Port); 00233 00234 00253 const char* MakeMessagePrintable(const char* InputString, const char* NewLine, CHMint32 MaximumLength); 00254 00255 00268 void StopListen(); 00269 00270 00283 void DisconnectAllClients(); 00284 00285 00293 virtual void OnErrorReceived(const char* ErrorMessage, CHMint32 Code)=0; 00294 00295 00303 virtual void OnClientConnected(CHMllpConnection& Client)=0; 00304 00305 00314 virtual void OnClientDisconnected(CHMllpConnection& Client)=0; 00315 00316 00329 virtual void OnClientErrorReceived(CHMllpConnection& Client, const char* ErrorMessage, CHMint32 ErrorCode)=0; 00330 00331 00343 virtual void OnMessageReceived(CHMllpConnection& Client, const char* Message)=0; 00344 00345 00358 virtual void OnDataIgnored(CHMllpConnection& Client, const char* Data)=0; 00359 00360 00361 private: 00362 CHMllpServer(const CHMllpServer& Orig); // Not allowed 00363 CHMllpServer& operator=(const CHMllpServer& Orig); // Not allowed 00364 static void setup(); 00365 CHMlistenerHandle Handle; 00366 }; 00367 00368 #endif // end of defensive include