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

# oscl_ip_socket.h

Go to the documentation of this file.

    00001
    00002 #ifndef OSCL_IP_SOCKET_H_INCLUDED
    00003 #define OSCL_IP_SOCKET_H_INCLUDED
    00004
    00005 #include "oscl_socket_types.h"
    00006 #include "oscl_vector.h"
    00007 #include "oscl_mem.h"
    00008
    00011 class OsclSocketServ;
    00012 class OsclSocketI;
    00013 class OsclSocketServI;
    00014 class PVLogger;
    00015 class OsclIPSocketI
    00016 {
    00017     public:
    00018         //Synchronous methods.
    00019         int32 Bind(OsclNetworkAddress& aAddress);
    00020         int32 Join(OsclNetworkAddress& aAddress);
    00021         int32 SetRecvBufferSize(uint32 size);
    00022         int32 SetOptionToReuseAddress();
    00023         int32 SetTOS(const OsclSocketTOS& aTOS);
    00024         int32 GetPeerName(OsclNetworkAddress& peerName);
    00025         virtual int32 Close() = 0;
    00026         virtual uint8 *GetRecvData(int32 *aLength) = 0;
    00027         virtual uint8 *GetSendData(int32 *aLength) = 0;
    00028         virtual ~OsclIPSocketI() {}
    00029         void ThreadLogoff();
    00030         void ThreadLogon(OsclSocketObserver *aObs, OsclSocketServI* aServ);
    00031
    00032         OsclSocketServI* SocketServ()
    00033         {
    00034             return iSocketServ;
    00035         }
    00036         Oscl_DefAlloc& Alloc()
    00037         {
    00038             return iAlloc;
    00039         }
    00040
    00041     protected:
    00042         Oscl_DefAlloc &iAlloc;
    00043
    00044         OsclNetworkAddress iAddress;
    00045         uint32 iId;
    00046         OsclSocketObserver *iObserver;
    00047         OsclSocketI *iSocket;
    00048         OsclSocketServI *iSocketServ;
    00049         PVLogger* iLogger;
    00050
    00051         friend class OsclSocketRequestAO;
    00052         friend class OsclSocketMethod;
    00053
    00054         OsclIPSocketI(Oscl_DefAlloc& a): iAlloc(a)
    00055                 , iId(0)
    00056                 , iObserver(NULL)
    00057                 , iSocket(NULL)
    00058                 , iSocketServ(NULL)
    00059                 , iLogger(NULL)
    00060         {}
    00061
    00062         void ConstructL(OsclSocketObserver *aObs, OsclSocketI* aSock, OsclSocketServI* aServ, uint32 aId);
    00063
    00064 };
    00065
    00066
    00067
    00068 #endif
    00069
    00070