Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

oscl_socket_serv_imp_base.h

Go to the documentation of this file.
00001 
00002 #ifndef OSCL_SOCKET_SERV_IMP_BASE_H_INCLUDED
00003 #define OSCL_SOCKET_SERV_IMP_BASE_H_INCLUDED
00004 
00005 #include "oscl_base.h"
00006 #include "oscl_socket_stats.h"
00007 
00008 class PVLogger;
00009 
00015 class OsclSocketServIBase
00016 {
00017     public:
00018         virtual ~OsclSocketServIBase()
00019         {}
00020 
00021         virtual int32 Connect(uint32 aMessageSlots) = 0;
00022         virtual void Close(bool) = 0;
00023 
00024     protected:
00025         OsclSocketServIBase(Oscl_DefAlloc &a)
00026                 : iAlloc(a)
00027         {
00028             iServError = 0;
00029             iServState = ESocketServ_Idle;
00030             iLogger = NULL;
00031         }
00032 
00033         Oscl_DefAlloc &iAlloc;
00034 
00035         //server state
00036         enum TSocketServState
00037         {
00038             ESocketServ_Idle
00039             , ESocketServ_Connected
00040             , ESocketServ_Error
00041         };
00042         TSocketServState iServState;
00043 
00044         TSocketServState State()const
00045         {
00046             return iServState;
00047         }
00048 
00049         bool IsServConnected()const
00050         {
00051             return iServState == ESocketServ_Connected;
00052         }
00053         int iServError;
00054 
00055 #if(PV_OSCL_SOCKET_STATS_LOGGING)
00056         //server stats
00057         OsclSocketServStats iServStats;
00058 #endif
00059 
00060     public:
00061         PVLogger* iLogger;
00062 };
00063 
00064 
00065 
00066 #endif
00067 
00068 
00069 

OSCL API
Posting Version: OPENCORE_20090310