|
1 /* |
|
2 * Copyright (c) 2005-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: This interface is used by |
|
15 * clients to get and availability setting for Video Charging |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef MUSSESSIONSIMULATOR_H_ |
|
21 #define MUSSESSIONSIMULATOR_H_ |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <mcemanager.h> |
|
25 |
|
26 class MMceSessionObserver; |
|
27 |
|
28 class MTimerNotify |
|
29 { |
|
30 public: |
|
31 virtual void TimerExpired(TAny* aTimer,TInt aError) = 0; |
|
32 }; |
|
33 |
|
34 class CMusTestTimer: public CActive |
|
35 { |
|
36 public: |
|
37 static CMusTestTimer* NewL(const TInt aPriority,MTimerNotify& aNotify); |
|
38 ~CMusTestTimer(); |
|
39 public: |
|
40 void At(const TTime& aTime); |
|
41 void After(TTimeIntervalMicroSeconds32 aInterval); |
|
42 void Inactivity(TTimeIntervalSeconds aSeconds); |
|
43 protected: |
|
44 void RunL(); |
|
45 void DoCancel(); |
|
46 private: |
|
47 CMusTestTimer(const TInt aPriority,MTimerNotify& aNotify); |
|
48 void ConstructL(void); |
|
49 private: |
|
50 RTimer iTimer; |
|
51 MTimerNotify& iNotify; |
|
52 }; |
|
53 |
|
54 class CMusTestSessionSimulator : public MTimerNotify |
|
55 { |
|
56 |
|
57 public: |
|
58 static CMusTestSessionSimulator* NewL( CMceManager& aObserver ); |
|
59 CMusTestSessionSimulator( CMceManager& aObserver ); |
|
60 ~CMusTestSessionSimulator(); |
|
61 void StartL(); |
|
62 void Stop(); |
|
63 TBool IsRunning(); |
|
64 private: |
|
65 void ConstructL(); |
|
66 void StateChangeL(); |
|
67 void TimerExpired(TAny* aTimer,TInt aError); |
|
68 void SimulateReceiveSession(); |
|
69 private: |
|
70 CMceManager& iManager; |
|
71 |
|
72 private : |
|
73 CMusTestTimer* iTimer; |
|
74 TBool ibIncoming; |
|
75 }; |
|
76 |
|
77 #endif /* MUSSESSIONSIMULATOR_H_ */ |