|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MCCRESOURCECONTAINER_H |
|
22 #define MCCRESOURCECONTAINER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 |
|
27 #include "mccresources.h" |
|
28 |
|
29 // CONSTANTS |
|
30 |
|
31 // MACROS |
|
32 |
|
33 // DATA TYPES |
|
34 |
|
35 // FUNCTION PROTOTYPES |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 class CMccResourceItem; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * |
|
44 */ |
|
45 class CMccResourceContainer : public CBase |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CMccResourceContainer* NewLC( const TMccResourceParams& aParams, |
|
53 RPointerArray<CMccResourceItem>& aAllEndpoints ); |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 */ |
|
58 static CMccResourceContainer* NewL( const TMccResourceParams& aParams, |
|
59 RPointerArray<CMccResourceItem>& aAllEndpoints ); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 virtual ~CMccResourceContainer(); |
|
65 |
|
66 public: // New functions |
|
67 |
|
68 void AddResourceItemL( const TMccResourceParams& aUser, CMccResourceItem* aItem ); |
|
69 |
|
70 CMccResourceItem* FindResourceItem( TUint32 aEndpointId ); |
|
71 |
|
72 TUint32 LinkId() const; |
|
73 |
|
74 TUint32 StreamId() const; |
|
75 |
|
76 void SetResourceStateL( TUint32 aEndpointId, |
|
77 MMccResources::TResourceState aState, |
|
78 TBool& aControlNetworkResources, |
|
79 RArray<TUint32>& aControlledEndpoints, |
|
80 RArray<TUint32>& aUncontrolledEndpoints ); |
|
81 |
|
82 TBool IsStandBy(); |
|
83 |
|
84 void SetStandbyControl( TBool aStandbyControl ); |
|
85 |
|
86 TBool StandbyControl() const; |
|
87 |
|
88 TBool DtmfControl() const; |
|
89 |
|
90 CMccResourceItem& FetchStandbyEndpointL(); |
|
91 |
|
92 void SetEnableRtcp( TBool aEnableRtcp ); |
|
93 |
|
94 TBool EnableRtcp() const; |
|
95 |
|
96 void HandleEndpointRemoval( TUint32 aEndpointId = 0 ); |
|
97 |
|
98 public: // Functions from base classes |
|
99 |
|
100 protected: // New functions |
|
101 |
|
102 protected: // Functions from base classes |
|
103 |
|
104 private: |
|
105 |
|
106 CMccResourceContainer( const TMccResourceParams& aParams, |
|
107 RPointerArray<CMccResourceItem>& aAllEndpoints ); |
|
108 |
|
109 |
|
110 private: |
|
111 |
|
112 void DeleteEndpoint( TUint32 aEndpointId ); |
|
113 |
|
114 public: // Data |
|
115 |
|
116 protected: // Data |
|
117 |
|
118 private: // Data |
|
119 |
|
120 TMccResourceParams iParams; |
|
121 |
|
122 TBool iStandbyControl; |
|
123 |
|
124 TBool iStreamInUserInititatedMode; |
|
125 |
|
126 RPointerArray<CMccResourceItem> iOwnEndpoints; |
|
127 |
|
128 RPointerArray<CMccResourceItem>& iAllEndpoints; |
|
129 |
|
130 TBool iEnableRtcp; |
|
131 |
|
132 public: // Friend classes |
|
133 |
|
134 protected: // Friend classes |
|
135 |
|
136 private: // Friend classes |
|
137 #ifdef TEST_EUNIT |
|
138 friend class UT_CMccResourceContainer; |
|
139 #endif |
|
140 |
|
141 }; |
|
142 |
|
143 #endif // MCCRESOURCECONTAINER_H |
|
144 |
|
145 // End of File |