|
1 /***************************************************************************** |
|
2 File : DownloadPathHandler.inl |
|
3 Part of : web_plat / download_path_plugin_api |
|
4 Description : Music path plugin interface inline implementation file |
|
5 Version : %version: 3 % << Don't touch! Updated by Synergy at check-out. |
|
6 |
|
7 Copyright (c) 2010 Nokia Corporation. |
|
8 This material, including documentation and any related |
|
9 computer programs, is protected by copyright controlled by |
|
10 Nokia Corporation. All rights are reserved. Copying, |
|
11 including reproducing, storing, adapting or translating, any |
|
12 or all of this material requires the prior written consent of |
|
13 Nokia Corporation. This material also contains confidential |
|
14 information which may not be disclosed to others without the |
|
15 prior written consent of Nokia Corporation. |
|
16 |
|
17 ***************************************************************************** |
|
18 Definition of the CDownloadPathHandler inline functions |
|
19 *****************************************************************************/ |
|
20 |
|
21 // ----------------------------------------------------------------------------- |
|
22 // C++ default constructor can NOT contain any code, that |
|
23 // might leave. |
|
24 // ----------------------------------------------------------------------------- |
|
25 // |
|
26 inline CDownloadPathHandler::CDownloadPathHandler() |
|
27 { |
|
28 } |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // Destructor only uses the ECOM framework and the private member iDtor_ID_Key |
|
32 // to destroy the instance |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 inline CDownloadPathHandler::~CDownloadPathHandler() |
|
36 { |
|
37 // Destroy any instance variables and then |
|
38 // inform the framework that this specific |
|
39 // instance of the interface has been destroyed. |
|
40 REComSession::DestroyedImplementation( iDtor_ID_Key ); |
|
41 } |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // This factory uses a resolver parameter to find appropriate type of the |
|
45 // instance to be returned |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 inline CDownloadPathHandler* CDownloadPathHandler::NewL( const TDesC& aMatchString ) |
|
49 { |
|
50 CDownloadPathHandler* handler = CDownloadPathHandler::NewLC( aMatchString ); |
|
51 CleanupStack::Pop( handler ); |
|
52 return handler; |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // This factory uses a resolver parameter to find appropriate type of the |
|
57 // instance to be returned. Leaves pointer on the cleanup stack. |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 inline CDownloadPathHandler* CDownloadPathHandler::NewLC( const TDesC& aMatchString ) |
|
61 { |
|
62 HBufC8* matchString8 = HBufC8::NewLC( aMatchString.Length() ); |
|
63 matchString8->Des().Copy( aMatchString ); |
|
64 CDownloadPathHandler* handler = CDownloadPathHandler::NewLC( matchString8->Des() ); |
|
65 CleanupStack::PopAndDestroy( matchString8 ); |
|
66 return handler; |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // This factory uses a resolver parameter to find appropriate type of the |
|
71 // instance to be returned |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 inline CDownloadPathHandler* CDownloadPathHandler::NewL( const TDesC8& aMatchString ) |
|
75 { |
|
76 CDownloadPathHandler* handler = CDownloadPathHandler::NewLC( aMatchString ); |
|
77 CleanupStack::Pop( handler ); |
|
78 return handler; |
|
79 } |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // This factory uses a resolver parameter to find appropriate type of the |
|
83 // instance to be returned. Leaves pointer on the cleanup stack. |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 inline CDownloadPathHandler* CDownloadPathHandler::NewLC( const TDesC8& aMatchString ) |
|
87 { |
|
88 // Set up the interface find for the default resolver. |
|
89 TEComResolverParams resolverParams; |
|
90 resolverParams.SetDataType( aMatchString ); |
|
91 resolverParams.SetWildcardMatch( ETrue ); // Allow wildcard matching |
|
92 |
|
93 TAny* ptr = REComSession::CreateImplementationL( KCDownloadPathHandlerUid, |
|
94 _FOFF( CDownloadPathHandler,iDtor_ID_Key ), |
|
95 resolverParams ); |
|
96 CleanupStack::PushL( ptr ); |
|
97 return REINTERPRET_CAST( CDownloadPathHandler*, ptr ); |
|
98 } |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // This function lists all the implementations currently present in the |
|
102 // ECOM framework. |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 inline void CDownloadPathHandler::ListAllImplementationsL( RImplInfoPtrArray& aImplInfoArray ) |
|
106 { |
|
107 REComSession::ListImplementationsL( KCDownloadPathHandlerUid, aImplInfoArray ); |
|
108 } |
|
109 |
|
110 // End of file |