|
1 /* |
|
2 * Copyright (c) 2009 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MUSAPPLICATIONMANAGER_H |
|
20 #define MUSAPPLICATIONMANAGER_H |
|
21 |
|
22 #include "musmanagercommon.h" |
|
23 #include "musunittesting.h" |
|
24 |
|
25 #include <apgcli.h> |
|
26 #include <apgtask.h> |
|
27 #include <e32base.h> |
|
28 #include <w32std.h> |
|
29 |
|
30 //class TApaTask; |
|
31 |
|
32 /** |
|
33 * Multimedia Sharing application handler |
|
34 * |
|
35 * Handles application launch and close functionality. Also |
|
36 * but application to foreground if all ready running. |
|
37 * |
|
38 * @lib none |
|
39 */ |
|
40 class CMusApplicationManager : public CBase |
|
41 { |
|
42 MUS_UNITTEST( UT_CMusApplicationManager ) |
|
43 |
|
44 public: // first phase constructors & destructor |
|
45 |
|
46 /** |
|
47 * |
|
48 */ |
|
49 static CMusApplicationManager* NewL(); |
|
50 |
|
51 /** |
|
52 * |
|
53 */ |
|
54 static CMusApplicationManager* NewLC(); |
|
55 |
|
56 /** |
|
57 * |
|
58 */ |
|
59 ~CMusApplicationManager(); |
|
60 |
|
61 |
|
62 protected: // second phase constructors |
|
63 |
|
64 /** |
|
65 * |
|
66 */ |
|
67 void ConstructL(); |
|
68 |
|
69 /** |
|
70 * |
|
71 */ |
|
72 CMusApplicationManager(); |
|
73 |
|
74 |
|
75 public: // new public functions |
|
76 |
|
77 /** |
|
78 * @return TBool ETrue if application is runing ( MultimediaSharing ) |
|
79 */ |
|
80 TBool ApplicationRunning(); |
|
81 |
|
82 /** |
|
83 * |
|
84 */ |
|
85 void StartApplicationL(); |
|
86 |
|
87 /** |
|
88 * |
|
89 */ |
|
90 void StopApplicationL(); |
|
91 |
|
92 /** |
|
93 * Brings application to foreground if running all reaydy. |
|
94 */ |
|
95 void ShowApplicationL(); |
|
96 |
|
97 /** |
|
98 * Writes given array and other parameter spefic date to Publish & |
|
99 * Subscripe database. |
|
100 */ |
|
101 void WriteSessionPropertiesL( |
|
102 MultimediaSharing::TMusUseCase aUseCase, |
|
103 MultimediaSharing::TMusAvailabilityStatus aStatus, |
|
104 MDesCArray& aSessionParameters ); |
|
105 |
|
106 /** |
|
107 * Overrided version whitout use case. |
|
108 * |
|
109 */ |
|
110 void WriteSessionPropertiesL( |
|
111 MultimediaSharing::TMusAvailabilityStatus aStatus, |
|
112 MDesCArray& aSessionParameters ); |
|
113 |
|
114 /** |
|
115 * |
|
116 */ |
|
117 void SetStatusL( MultimediaSharing::TMusAvailabilityStatus aStatus ); |
|
118 |
|
119 /** |
|
120 * |
|
121 */ |
|
122 void SetIndicatorStatusL( TBool aLaunch ); |
|
123 |
|
124 |
|
125 private: // helper functions |
|
126 |
|
127 /** |
|
128 * |
|
129 */ |
|
130 void SetPropertyL( TUint aProperty, const TDesC& aValue ); |
|
131 |
|
132 /** |
|
133 * |
|
134 */ |
|
135 void SetPropertyL( TUint aProperty, TInt aValue ); |
|
136 |
|
137 /** |
|
138 * |
|
139 */ |
|
140 TApaTask GetApaTask(); |
|
141 |
|
142 |
|
143 private: // owned data |
|
144 |
|
145 /** |
|
146 * Window server session handle |
|
147 */ |
|
148 RWsSession iWsSession; |
|
149 |
|
150 /** |
|
151 * |
|
152 */ |
|
153 RApaLsSession iApaSession; |
|
154 }; |
|
155 |
|
156 |
|
157 #endif // ? MUSAPPLICATIONMANAGER_H |