1 /* |
|
2 * Copyright (c) 2007 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: Delivers asynchronous requests to ETel |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSPETELCONFERENCECALLREQUESTER_H |
|
20 #define CSPETELCONFERENCECALLREQUESTER_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <etelmm.h> |
|
25 #include <rmmcustomapi.h> |
|
26 |
|
27 class CSPCall; |
|
28 class MCCPCallObserver; |
|
29 class CSPConferenceCall; |
|
30 |
|
31 /** |
|
32 * Makes asynchronic request to ETel interface according to given request type. |
|
33 * Provides canceling via CActive::Cancel(). |
|
34 * |
|
35 */ |
|
36 class CSPEtelConferenceCallRequester |
|
37 : public CActive |
|
38 { |
|
39 |
|
40 public: |
|
41 /** |
|
42 * Supported request types. |
|
43 */ |
|
44 enum TConferenceRequestType { |
|
45 EConferenceRequestTypeAddCall, |
|
46 EConferenceRequestTypeHangup, |
|
47 EConferenceRequestTypeHold, |
|
48 EConferenceRequestTypeResume, |
|
49 EConferenceRequestTypeCreateConference, |
|
50 EConferenceRequestTypeSwap |
|
51 }; |
|
52 |
|
53 /** |
|
54 * Constructs the requester via two phase. |
|
55 * |
|
56 * @param aOwner the owner for the requester |
|
57 * @param aCall ETel RMobileCall reference that is the object |
|
58 * of the request. |
|
59 */ |
|
60 static CSPEtelConferenceCallRequester* NewL( |
|
61 CSPConferenceCall& aOwner, |
|
62 RMobileConferenceCall& aCall ); |
|
63 |
|
64 /** |
|
65 * C++ default destructor |
|
66 */ |
|
67 virtual ~CSPEtelConferenceCallRequester( ); |
|
68 |
|
69 /** |
|
70 * Makes the request. Note that ERequestTypeDial is made with a |
|
71 * separate MakeDialRequest function. |
|
72 * |
|
73 * @since S60 3.2 |
|
74 * @param aRequest type of request |
|
75 * @return KErrNone if request was sent successfully. |
|
76 * KErrNotSupported if the given request is not supported |
|
77 * KErrArgument if the specified request is not known. |
|
78 * KErrUnknown if unspecified error (should not happen) |
|
79 */ |
|
80 TInt MakeRequest( TConferenceRequestType aRequest ); |
|
81 |
|
82 |
|
83 /** |
|
84 * Makes a dial request. |
|
85 * @since S60 3.2 |
|
86 * @param aCallName call name to be added |
|
87 * @return KErrNone if successful, else error code |
|
88 */ |
|
89 TInt MakeAddCallRequest( const TName& aCallName ); |
|
90 |
|
91 |
|
92 protected: // From CActive |
|
93 /** |
|
94 * From CActive |
|
95 * RunL |
|
96 * @since S60 3.2 |
|
97 */ |
|
98 void RunL(); |
|
99 |
|
100 /** |
|
101 * From CActive |
|
102 * Cancels the monitor |
|
103 * @since S60 3.2 |
|
104 */ |
|
105 void DoCancel(); |
|
106 |
|
107 |
|
108 private: |
|
109 |
|
110 /** |
|
111 * Constructs the requester. |
|
112 * |
|
113 * @param aOwner the owner for the requester |
|
114 * @param aCall ETel RMobileCall reference that is the object |
|
115 * of the request. |
|
116 */ |
|
117 CSPEtelConferenceCallRequester( CSPConferenceCall& aOwner, |
|
118 RMobileConferenceCall& aCall ); |
|
119 |
|
120 /** |
|
121 * Constructing in the second phase. |
|
122 */ |
|
123 void ConstructL(); |
|
124 |
|
125 private: // data |
|
126 /** |
|
127 * Call object which owns this monitor |
|
128 */ |
|
129 CSPConferenceCall& iOwner; |
|
130 |
|
131 /** |
|
132 * ETel call which this monitors |
|
133 */ |
|
134 RMobileConferenceCall& iCall; |
|
135 |
|
136 /** |
|
137 * Type of request. |
|
138 */ |
|
139 TConferenceRequestType iRequestType; |
|
140 |
|
141 }; |
|
142 |
|
143 #endif // CSPETELCONFERENCECALLREQUESTER_H |
|