49
|
1 |
/*
|
|
2 |
* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Provides a comfort noise generator class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef MCCDATASENDER_H
|
|
21 |
#define MCCDATASENDER_H
|
|
22 |
#include <E32Base.h>
|
|
23 |
#include <e32msgqueue.h>
|
|
24 |
#include "mccexpirationhandler.h"
|
|
25 |
#include "mcctimermanager.h"
|
|
26 |
|
|
27 |
#include <CMSRP.h>
|
|
28 |
#include <CMSRPSession.h>
|
|
29 |
|
|
30 |
|
|
31 |
typedef TBuf8<50> TQueueBuffer;
|
|
32 |
|
|
33 |
// CLASS DECLARATION
|
|
34 |
|
|
35 |
/**
|
|
36 |
* CMccPeriodicRunner class declaration
|
|
37 |
*/
|
|
38 |
class CMccMsrpDataSender : public CActive, public MMccExpirationHandler
|
|
39 |
{
|
|
40 |
public:
|
|
41 |
|
|
42 |
static CMccMsrpDataSender* NewL();
|
|
43 |
|
|
44 |
~CMccMsrpDataSender();
|
|
45 |
|
|
46 |
public:
|
|
47 |
|
|
48 |
void SendL( const TDesC8& aData , CMSRPSession* aMsrpSession);
|
|
49 |
void SendPacketL(CMSRPSession* aMsrpSession);
|
|
50 |
|
|
51 |
public: // From CActive
|
|
52 |
|
|
53 |
void DoCancel();
|
|
54 |
void RunL();
|
|
55 |
TInt RunError(TInt aError);
|
|
56 |
|
|
57 |
private:
|
|
58 |
CMccMsrpDataSender();
|
|
59 |
void ConstructL(); // second construction phase
|
|
60 |
|
|
61 |
protected: // From MMccExpirationHandler
|
|
62 |
|
|
63 |
void TimerExpiredL( TMccTimerId aTimerId, TAny* aTimerParam );
|
|
64 |
|
|
65 |
private:
|
|
66 |
|
|
67 |
RMsgQueue<TQueueBuffer> iMsgQueue;
|
|
68 |
TQueueBuffer iBuffer;
|
|
69 |
|
|
70 |
CMccTimerManager* iTimeoutTimer;
|
|
71 |
TMccTimerId iTimerId;
|
|
72 |
TUint32 iTimeoutTimeMilliseconds;
|
|
73 |
|
|
74 |
};
|
|
75 |
|
|
76 |
|
|
77 |
#endif
|