|
1 /* |
|
2 * Copyright (c) 2005-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: CUpnpSelectionWriter class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef UPNPSELECTIONWRITER_H |
|
24 #define UPNPSELECTIONWRITER_H |
|
25 |
|
26 // INCLUDES |
|
27 |
|
28 #include <badesca.h> // for CDesCArray |
|
29 #include <centralrepository.h> |
|
30 #include "upnpcontentserverdefs.h" |
|
31 |
|
32 |
|
33 using namespace UpnpContentServer; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * CUpnpSelectionWriter utility class |
|
39 * @since S60 3.1 |
|
40 */ |
|
41 class CUpnpSelectionWriter: public CBase |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * @since S60 3.1 |
|
47 * @param aMediaType Type of selections currently active |
|
48 */ |
|
49 static CUpnpSelectionWriter* NewL( |
|
50 TUpnpMediaType aMediaType ); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 virtual ~CUpnpSelectionWriter(); |
|
56 |
|
57 /** |
|
58 * Append identifier of the container which is shared next |
|
59 * @since S60 3.1 |
|
60 * @param aNewObject, name of the object |
|
61 */ |
|
62 void AppendItemL( const TPtrC aNewObject ); |
|
63 |
|
64 /** |
|
65 * Append index of succesfully shared container |
|
66 * @since S60 3.1 |
|
67 * @param aIndex, Index of the container |
|
68 */ |
|
69 void AppendStatusL( const TInt aIndex ); |
|
70 |
|
71 /** |
|
72 * Saves sharing state to central repository and updates shared albums |
|
73 * @since S60 3.1 |
|
74 * @param aShareAllSelection, The selections type in UI( Share all \ |
|
75 / None / Many ) |
|
76 * @return TInt, error code |
|
77 */ |
|
78 TInt SaveSharingStateL( TInt aShareAllSelection ); |
|
79 |
|
80 private: // New functions |
|
81 /** |
|
82 * 2nd phase constructor. |
|
83 * @since S60 3.1 |
|
84 * @param aMediaType Type of selections currently active |
|
85 */ |
|
86 void ConstructL( TUpnpMediaType aMediaType ); |
|
87 |
|
88 /** |
|
89 * Save the containers to file |
|
90 * @since S60 3.1 |
|
91 */ |
|
92 TInt StoreSharedContainerIDsL() const; |
|
93 |
|
94 /** |
|
95 * C++ default constructor. |
|
96 * @since S60 3.1 |
|
97 */ |
|
98 CUpnpSelectionWriter(); |
|
99 |
|
100 private: //data |
|
101 /** |
|
102 * Mediatype selected from listbox |
|
103 */ |
|
104 TInt iMediaType; |
|
105 |
|
106 /** |
|
107 * selection type |
|
108 */ |
|
109 TInt iShareAllSelection; |
|
110 |
|
111 /** |
|
112 * array of succesfully shared containers. |
|
113 */ |
|
114 RArray<TInt> iOkItems; |
|
115 |
|
116 /** |
|
117 * array for albums/playlist |
|
118 * owned |
|
119 */ |
|
120 CDesCArrayFlat* iFileArray; |
|
121 |
|
122 /** |
|
123 * Pointer to Central repository |
|
124 * owned |
|
125 */ |
|
126 CRepository* iRepository; |
|
127 }; |
|
128 |
|
129 #endif |
|
130 // End of File |