javacommons/comms/ipclib/clientserver/src.s60/creceiver.cpp
branchRCL_3
changeset 71 d5e927d5853b
parent 66 2455ef1f5bbc
child 83 26b2b12093af
equal deleted inserted replaced
66:2455ef1f5bbc 71:d5e927d5853b
    31 const TInt DEFAULT_BUFFER_SIZE  = 2048;
    31 const TInt DEFAULT_BUFFER_SIZE  = 2048;
    32 
    32 
    33 CReceiver::CReceiver(IpcClient& aParent, IpcListener& aListener, RComms& aSession)
    33 CReceiver::CReceiver(IpcClient& aParent, IpcListener& aListener, RComms& aSession)
    34         : CActive(EPriorityStandard), mParent(aParent), mListener(aListener), mSession(aSession)
    34         : CActive(EPriorityStandard), mParent(aParent), mListener(aListener), mSession(aSession)
    35 {
    35 {
       
    36 }
       
    37 
       
    38 CReceiver* CReceiver::NewLC(IpcClient& aParent, IpcListener& aListener, RComms& aSession)
       
    39 {
       
    40     CReceiver* self = new(ELeave) CReceiver(aParent, aListener, aSession);
       
    41     CleanupStack::PushL(self);
       
    42     self->ConstructL();
       
    43     return self;
       
    44 }
       
    45 
       
    46 void CReceiver::ConstructL()
       
    47 {
    36     CActiveScheduler::Add(this);
    48     CActiveScheduler::Add(this);
    37     mBuffer.Create(DEFAULT_BUFFER_SIZE);
    49     mBuffer.CreateL(DEFAULT_BUFFER_SIZE);
    38 }
    50 }
    39 
    51 
    40 CReceiver::~CReceiver()
    52 CReceiver::~CReceiver()
    41 {
    53 {
    42     mBuffer.Close();
    54     mBuffer.Close();