|
1 /* |
|
2 * Copyright (c) 2004-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 the License "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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <ecom/ecom.h> |
|
20 #include "agentfactory.h" |
|
21 #include "agentinterface.h" |
|
22 #include "caferr.h" |
|
23 |
|
24 using namespace ContentAccess; |
|
25 |
|
26 |
|
27 CAgentFactory* CAgentFactory::NewL(TUid aUid) |
|
28 { |
|
29 return static_cast<CAgentFactory*> (REComSession::CreateImplementationL(aUid, _FOFF(CAgentFactory,iEcomKey))); |
|
30 } |
|
31 |
|
32 |
|
33 EXPORT_C CAgentFactory::~CAgentFactory() |
|
34 { |
|
35 // Finished with ECOM session so destroy implementation pointer |
|
36 // iEcomKey was set by ECOM during construction |
|
37 // This may cause the agent DLL to unload |
|
38 REComSession::DestroyedImplementation(iEcomKey); |
|
39 } |
|
40 |
|
41 |
|
42 // default implementations |
|
43 |
|
44 EXPORT_C TInt CAgentManager::RenameDir(const TDesC& /*aOldName*/, const TDesC& /* aNewName */) |
|
45 { |
|
46 return KErrCANotSupported; |
|
47 } |
|
48 |
|
49 EXPORT_C void CAgentImportFile::Cancel() |
|
50 { |
|
51 // default implementation does nothing |
|
52 } |
|
53 EXPORT_C TBool CAgentImportFile::ContentMimeTypeL(TDes8& /*aContentMime*/) |
|
54 { |
|
55 User::Leave(KErrCANotSupported); |
|
56 return EFalse; |
|
57 } |
|
58 EXPORT_C TInt CAgentManager::CopyFile(RFile& /* aSource */, const TDesC& /* aDestination */) |
|
59 { |
|
60 return KErrCANotSupported; |
|
61 } |
|
62 |
|
63 EXPORT_C TInt CAgentData::Read(TInt /* aPos */, TDes8& /* aDes */, TInt /* aLength */, TRequestStatus& /* aStatus */) |
|
64 { |
|
65 return KErrCANotSupported; |
|
66 } |
|
67 |
|
68 EXPORT_C void CAgentData::ReadCancel(TRequestStatus&) |
|
69 { |
|
70 } |