|
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: upnpsharingalgorithm interface |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef M_UPNP_SHARING_ALGORITHM_H |
|
19 #define M_UPNP_SHARING_ALGORITHM_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class CUpnpCdsLiteObjectArray; |
|
26 |
|
27 /** |
|
28 * Defines the upnp sharing algorithm interface |
|
29 * |
|
30 * @lib upnpsharingalgorithm.lib |
|
31 * @since S60 5.2 |
|
32 */ |
|
33 class MUpnpSharingAlgorithm |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Shares the given file using the local M-DMS. Does not share the same |
|
40 * file twice. Checks the validity of the parameter, existance of the |
|
41 * file and drm protection. Leaves with KErrArgument if the given |
|
42 * parameter is invalid or if the file does not exist. Leaves with |
|
43 * KErrAccessDenied if the file is drm protected. Leaves normally if |
|
44 * out-of-memory. |
|
45 * |
|
46 * @since S60 5.2 |
|
47 * @param aFileName, file to be shared |
|
48 */ |
|
49 virtual void ShareFileL( const TFileName &aFileName ) = 0; |
|
50 |
|
51 /** |
|
52 * Unshares the given file using the local M-DMS. Does not do anything if |
|
53 * the file is not shared. Leaves with KErrCorrupt if the component's |
|
54 * internal object array is corrupted. Leaves normally if out-of-memory. |
|
55 * |
|
56 * @since S60 5.2 |
|
57 * @param aFileName, file to be unshared |
|
58 */ |
|
59 virtual void UnshareFileL( const TFileName &aFileName ) = 0; |
|
60 |
|
61 /** |
|
62 * Reads the shared content from UPnPSharingalgoritm |
|
63 * |
|
64 * @since S60 5.2 |
|
65 * @return a reference to the shared content array in UPnPSharingalgoritm. |
|
66 */ |
|
67 virtual CUpnpCdsLiteObjectArray& ReadSharedContent() = 0; |
|
68 |
|
69 /** |
|
70 * Deletes the object and frees its resources. |
|
71 * |
|
72 * @since S60 5.2 |
|
73 */ |
|
74 virtual void Close() = 0; |
|
75 |
|
76 /** |
|
77 * Check if item is shared based on item filename |
|
78 * |
|
79 * @since S60 5.2 |
|
80 * @param aFileName, file to be checked |
|
81 * @return TBool, ETrue if item is shared, EFalse otherwise |
|
82 */ |
|
83 virtual TBool IsFileSharedL( const TFileName &aFileName ) = 0; |
|
84 }; |
|
85 |
|
86 #endif /* M_UPNP_SHARING_ALGORITHM_H */ |
|
87 |
|
88 // End of File |
|
89 |