First public contribution.
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
20 #include <ecom/ecom.h>
21 #include <caf/agentfactory.h>
22 #include <caf/agentinterface.h>
23 #include <caf/caferr.h>
25 using namespace ContentAccess;
28 CAgentFactory* CAgentFactory::NewL(TUid aUid)
30 return static_cast<CAgentFactory*> (REComSession::CreateImplementationL(aUid, _FOFF(CAgentFactory,iEcomKey)));
34 EXPORT_C CAgentFactory::~CAgentFactory()
36 // Finished with ECOM session so destroy implementation pointer
37 // iEcomKey was set by ECOM during construction
38 // This may cause the agent DLL to unload
39 REComSession::DestroyedImplementation(iEcomKey);
43 // default implementations
45 EXPORT_C TInt CAgentManager::RenameDir(const TDesC& /*aOldName*/, const TDesC& /* aNewName */)
47 return KErrCANotSupported;
50 EXPORT_C void CAgentImportFile::Cancel()
52 // default implementation does nothing
54 EXPORT_C TBool CAgentImportFile::ContentMimeTypeL(TDes8& /*aContentMime*/)
56 User::Leave(KErrCANotSupported);
59 EXPORT_C TInt CAgentManager::CopyFile(RFile& /* aSource */, const TDesC& /* aDestination */)
61 return KErrCANotSupported;
64 EXPORT_C TInt CAgentData::Read(TInt /* aPos */, TDes8& /* aDes */, TInt /* aLength */, TRequestStatus& /* aStatus */)
66 return KErrCANotSupported;
69 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
70 EXPORT_C TInt CAgentData::Read64(TInt64 /* aPos */, TDes8& /* aDes */, TInt /* aLength */, TRequestStatus& /* aStatus */)
72 return KErrCANotSupported;
75 EXPORT_C void CAgentData::DataSize64L(TInt64& /*aSize*/)
77 User::Leave(KErrCANotSupported);
80 EXPORT_C TInt CAgentData::Seek64(TSeek /*aMode*/, TInt64& /*aPos*/)
82 return KErrCANotSupported;
84 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
86 EXPORT_C void CAgentData::ReadCancel(TRequestStatus&)
90 EXPORT_C void CAgentRightsManager::ListRightsL(RStreamablePtrArray<CRightsInfo>& /* aArray */, RFile& /* aFile */, const TDesC& /* aUniqueId */) const
92 User::Leave(KErrCANotSupported);
95 EXPORT_C TInt CAgentRightsManager::DeleteAllRightsObjects (RFile& /* aFile */, const TDesC& /* aUniqueId */)
97 return KErrCANotSupported;
100 EXPORT_C TInt CAgentManager::GetAttribute(TInt /* aAttribute */, TInt& /* aValue */, RFile& /* aFile */, const TDesC& /* aUniqueId */)
102 return KErrCANotSupported;
105 EXPORT_C TInt CAgentManager::GetAttributeSet(RAttributeSet& /* aAttributeSet */, RFile& /* aFile */, const TDesC& /* aUniqueId */)
107 return KErrCANotSupported;
110 EXPORT_C TInt CAgentManager::GetStringAttribute(TInt /* aAttribute */, TDes& /* aValue */, RFile& /* aFile */, const TDesC& /* aUniqueId */)
112 return KErrCANotSupported;
115 EXPORT_C TInt CAgentManager::GetStringAttributeSet(RStringAttributeSet& /* aStringAttributeSet */, RFile& /* aFile */, const TDesC& /* aUniqueId */)
117 return KErrCANotSupported;
120 EXPORT_C void CAgentManager::DisplayInfoL (TDisplayInfo /* aInfo */, RFile& /* aFile */, const TDesC& /* aUniqueId */)
122 User::Leave(KErrCANotSupported);
125 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
127 EXPORT_C TInt CAgentData::Read(const TDesC8& /*aEncryptedInputDataPacket*/, TDes8& /*aDecryptedOutputDataPacket*/)
129 return KErrCANotSupported;
132 EXPORT_C void CAgentData::Read(const TDesC8& /*aEncryptedInputDataPacket*/, TDes8& /*aDecryptedOutputDataPacket*/, TRequestStatus& aStatus)
134 TRequestStatus* status = &aStatus;
135 User::RequestComplete(status, KErrCANotSupported);
138 EXPORT_C TBool CAgentManager::IsRecognizedL(const TDesC8& /*aHeaderData*/) const
143 EXPORT_C TBool CAgentManager::RecognizeContentL(const TDesC8& /*aHeaderData*/, TDes8& aFileMimeType, TDes8& aContentMimeType) const
145 aFileMimeType.Copy(KNullDesC8());
146 aContentMimeType.Copy(KNullDesC8());
150 EXPORT_C TInt CAgentManager::GetAttribute(const TDesC8& /*aHeaderData*/, TInt /*aAttribute*/, TInt& /*aValue*/)
152 return KErrCANotSupported;
155 EXPORT_C TInt CAgentManager::GetAttributeSet(const TDesC8& /*aHeaderData*/, RAttributeSet& /*aAttributeSet*/)
157 return KErrCANotSupported;
160 EXPORT_C TInt CAgentManager::GetStringAttribute(const TDesC8& /*aHeaderData*/, TInt /*aAttribute*/, TDes& /*aValue*/)
162 return KErrCANotSupported;
165 EXPORT_C TInt CAgentManager::GetStringAttributeSet(const TDesC8& /*aHeaderData*/, RStringAttributeSet& /*aStringAttributeSet*/)
167 return KErrCANotSupported;
170 EXPORT_C CAgentData* CAgentFactory::CreateDataConsumerL(const TDesC8& /*aHeaderData*/)
172 User::Leave(KErrCANotSupported);
173 // cannot reach here. The return statement is added to avoid warning.
177 EXPORT_C CAgentContent* CAgentFactory::CreateContentBrowserL(const TDesC8& /*aHeaderData*/)
179 User::Leave(KErrCANotSupported);
180 // cannot be reach here . The return statement is added to avoid warning.
185 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT