37
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2010 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: Declarations for class CSPAudioHandler
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CSPAUDIOHANDLER_H
|
|
19 |
#define CSPAUDIOHANDLER_H
|
|
20 |
|
|
21 |
#include <e32base.h>
|
65
|
22 |
#include "cspaudiohandlerbase.h"
|
|
23 |
#include "mtmshandlerobserver.h"
|
|
24 |
#include "mcsptimerobserver.h"
|
37
|
25 |
|
65
|
26 |
//FORWARD DECLARATIONS
|
37
|
27 |
class TmsHandler;
|
65
|
28 |
class CSPTimer;
|
|
29 |
|
37
|
30 |
/**
|
|
31 |
* Handles call adding from calls not done by the plugin.
|
|
32 |
*
|
|
33 |
*/
|
65
|
34 |
class CSPAudioHandler : public CSPAudioHandlerBase,
|
|
35 |
public MTmsHandlerObserver,
|
|
36 |
public MCSPTimerObserver
|
37
|
37 |
{
|
|
38 |
public:
|
|
39 |
//Constructors and descructor
|
|
40 |
|
|
41 |
/**
|
|
42 |
* Two-phased constructing for the monitor.
|
|
43 |
*/
|
|
44 |
static CSPAudioHandler* NewL();
|
|
45 |
|
|
46 |
/**
|
|
47 |
* C++ default destructor.
|
|
48 |
*/
|
|
49 |
virtual ~CSPAudioHandler();
|
65
|
50 |
|
|
51 |
// from base class CSPAudioHandlerBase
|
|
52 |
|
|
53 |
/*
|
|
54 |
* From CSPAudioHandlerBase
|
|
55 |
* Set observer to receive call audio stream events.
|
|
56 |
*/
|
|
57 |
void SetObserver(MCSPAudioHandlerObserver& aObserver);
|
37
|
58 |
|
|
59 |
/**
|
65
|
60 |
* From CSPAudioHandlerBase
|
|
61 |
* Start audio streams.
|
37
|
62 |
*/
|
|
63 |
void Start();
|
|
64 |
|
|
65 |
/**
|
65
|
66 |
* From CSPAudioHandlerBase
|
|
67 |
* Stop audio streams.
|
37
|
68 |
*/
|
|
69 |
void Stop();
|
|
70 |
|
65
|
71 |
/*
|
|
72 |
* From CSPAudioHandlerBase
|
|
73 |
* Specify timeout after which stream start retry will be terminated.
|
|
74 |
*/
|
|
75 |
void ReportAudioFailureAfterTimeout(TInt aTimeout);
|
|
76 |
|
37
|
77 |
protected:
|
65
|
78 |
/*
|
|
79 |
* From MTmsHandlerObserver
|
|
80 |
* Indicates call audio stream start success.
|
37
|
81 |
*/
|
65
|
82 |
void AudioStreamsStarted();
|
|
83 |
|
|
84 |
/*
|
|
85 |
* From MTmsHandlerObserver
|
|
86 |
* Indicates call audio stream start failure.
|
|
87 |
*/
|
|
88 |
void AudioStreamsError(TInt aError);
|
37
|
89 |
|
|
90 |
/**
|
65
|
91 |
* From MCSPTimerObserver.
|
37
|
92 |
*/
|
65
|
93 |
void TimerEvent();
|
37
|
94 |
|
|
95 |
private:
|
|
96 |
/**
|
|
97 |
* C++ default constructor
|
|
98 |
*/
|
|
99 |
CSPAudioHandler();
|
|
100 |
|
|
101 |
/**
|
|
102 |
* Constructs the monitor in the second phase.
|
|
103 |
*/
|
|
104 |
void ConstructL();
|
|
105 |
|
|
106 |
private:
|
|
107 |
// data
|
|
108 |
|
|
109 |
/**
|
|
110 |
* Audio streams handler.
|
|
111 |
*/
|
|
112 |
TmsHandler* iTmsHandler;
|
|
113 |
|
|
114 |
/**
|
|
115 |
* Call count
|
|
116 |
*/
|
|
117 |
TInt iCallCount;
|
65
|
118 |
|
|
119 |
/**
|
|
120 |
* Timer waiting for the activation of streams.
|
|
121 |
*/
|
|
122 |
CSPTimer* iTimer;
|
|
123 |
|
|
124 |
/*
|
|
125 |
* Observer receiving call audio stream start events.
|
|
126 |
*/
|
|
127 |
MCSPAudioHandlerObserver* iObserver;
|
37
|
128 |
};
|
|
129 |
|
|
130 |
#endif // CSPAUDIOHANDLER_H
|
65
|
131 |
|