author | Sampo Huttunen <sampo.huttunen@nokia.com> |
Wed, 03 Nov 2010 11:45:09 +0200 | |
branch | IOP_Improvements |
changeset 40 | 08b5eae9f9ff |
permissions | -rw-r--r-- |
40
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
1 |
/* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
8 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
11 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
13 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
14 |
* Description: upnpsharingalgorithm interface |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
15 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
17 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
18 |
#ifndef M_UPNP_SHARING_ALGORITHM_H |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
19 |
#define M_UPNP_SHARING_ALGORITHM_H |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
20 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
21 |
// INCLUDES |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
22 |
#include <e32base.h> |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
23 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
24 |
// FORWARD DECLARATIONS |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
25 |
class CUpnpCdsLiteObjectArray; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
26 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
27 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
28 |
* Defines the upnp sharing algorithm interface |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
29 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
30 |
* @lib upnpsharingalgorithm.lib |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
31 |
* @since S60 5.2 |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
32 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
33 |
class MUpnpSharingAlgorithm |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
34 |
{ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
35 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
36 |
public: |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
37 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
38 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
39 |
* Shares the given file using the local M-DMS. Does not share the same |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
40 |
* file twice. Checks the validity of the parameter, existance of the |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
41 |
* file and drm protection. Leaves with KErrArgument if the given |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
42 |
* parameter is invalid or if the file does not exist. Leaves with |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
43 |
* KErrAccessDenied if the file is drm protected. Leaves normally if |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
44 |
* out-of-memory. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
45 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
46 |
* @since S60 5.2 |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
47 |
* @param aFileName, file to be shared |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
48 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
49 |
virtual void ShareFileL( const TFileName &aFileName ) = 0; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
50 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
51 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
52 |
* Unshares the given file using the local M-DMS. Does not do anything if |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
53 |
* the file is not shared. Leaves with KErrCorrupt if the component's |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
54 |
* internal object array is corrupted. Leaves normally if out-of-memory. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
55 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
56 |
* @since S60 5.2 |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
57 |
* @param aFileName, file to be unshared |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
58 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
59 |
virtual void UnshareFileL( const TFileName &aFileName ) = 0; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
60 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
61 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
62 |
* Reads the shared content from UPnPSharingalgoritm |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
63 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
64 |
* @since S60 5.2 |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
65 |
* @return a reference to the shared content array in UPnPSharingalgoritm. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
66 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
67 |
virtual CUpnpCdsLiteObjectArray& ReadSharedContent() = 0; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
68 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
69 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
70 |
* Deletes the object and frees its resources. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
71 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
72 |
* @since S60 5.2 |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
73 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
74 |
virtual void Close() = 0; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
75 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
76 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
77 |
* Check if item is shared based on item filename |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
78 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
79 |
* @since S60 5.2 |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
80 |
* @param aFileName, file to be checked |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
81 |
* @return TBool, ETrue if item is shared, EFalse otherwise |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
82 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
83 |
virtual TBool IsFileSharedL( const TFileName &aFileName ) = 0; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
84 |
}; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
85 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
86 |
#endif /* M_UPNP_SHARING_ALGORITHM_H */ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
87 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
88 |
// End of File |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
89 |