|
AndroMeta
2.0.0
|
00001 /* 00002 * Copyright 2009-2012 AndroMeta LLC. All rights reserved. 00003 * 00004 * AndroMeta LLC retains all intellectual property and proprietary 00005 * rights to this software and related documentation and any modifications 00006 * thereto. Any use, reproduction, disclosure, or distribution of this 00007 * software and related documentation without an express license agreement 00008 * from AndroMeta LLC is strictly prohibited. 00009 * 00010 */ 00011 00018 #ifndef ANDROMETA_M_SERVER_H 00019 #define ANDROMETA_M_SERVER_H 00020 00021 #include <AndroMeta/MObject.h> 00022 00023 namespace Meta{ 00024 00025 class MProcTask; 00026 class MNetProc; 00027 class MAuth; 00028 00039 class MServer{ 00040 public: 00041 00051 MServer(MProcTask* task, MAuth* auth); 00052 00056 virtual ~MServer(); 00057 00061 MAuth* auth(); 00062 00066 const MAuth* auth() const; 00067 00071 MProcTask* task(); 00072 00078 bool listen(int port); 00079 00086 virtual MNetProc* serverSpawn() = 0; 00087 00094 virtual bool onConnect(const mstr& host); 00095 00104 virtual bool onAuthSuccess(mvar& session); 00105 00112 virtual void onAuthFail(mvar& session); 00113 00114 private: 00115 MServer& operator=(const MServer&); 00116 MServer(const MServer&); 00117 00118 class MServer_* x_; 00119 }; 00120 00121 } // end namespace Meta 00122 00123 #endif // ANDROMETA_M_SERVER_H
1.7.6.1