os/security/contentmgmt/contentaccessfwfordrm/source/caf/Agentfactory.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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 
    20 #include <ecom/ecom.h>
    21 #include <caf/agentfactory.h>
    22 #include <caf/agentinterface.h>
    23 #include <caf/caferr.h>
    24 
    25 using namespace ContentAccess;
    26 
    27 
    28 CAgentFactory* CAgentFactory::NewL(TUid aUid)
    29 	{
    30 	return static_cast<CAgentFactory*> (REComSession::CreateImplementationL(aUid, _FOFF(CAgentFactory,iEcomKey)));
    31 	}
    32 
    33 
    34 EXPORT_C CAgentFactory::~CAgentFactory()
    35 	{
    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);
    40 	}
    41 
    42 
    43 // default implementations
    44 
    45 EXPORT_C TInt CAgentManager::RenameDir(const TDesC& /*aOldName*/, const TDesC& /* aNewName */)
    46 	{
    47 	return KErrCANotSupported;
    48 	}
    49 
    50 EXPORT_C void CAgentImportFile::Cancel()
    51 	{
    52 	// default implementation does nothing	
    53 	}
    54 EXPORT_C TBool CAgentImportFile::ContentMimeTypeL(TDes8& /*aContentMime*/)
    55 	{
    56 	User::Leave(KErrCANotSupported);
    57 	return EFalse;
    58 	}
    59 EXPORT_C TInt CAgentManager::CopyFile(RFile& /* aSource */, const TDesC& /* aDestination */)
    60 	{
    61 	return KErrCANotSupported;
    62 	}
    63 
    64 EXPORT_C TInt CAgentData::Read(TInt /* aPos */, TDes8& /* aDes */, TInt /* aLength */, TRequestStatus& /* aStatus */)
    65 	{
    66 	return KErrCANotSupported;
    67 	}
    68 
    69 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
    70 EXPORT_C TInt CAgentData::Read64(TInt64 /* aPos */, TDes8& /* aDes */, TInt /* aLength */, TRequestStatus& /* aStatus */)
    71 	{
    72 	return KErrCANotSupported;
    73 	}
    74 
    75 EXPORT_C void CAgentData::DataSize64L(TInt64& /*aSize*/)
    76 	{
    77 	User::Leave(KErrCANotSupported);
    78 	}
    79 
    80 EXPORT_C TInt CAgentData::Seek64(TSeek /*aMode*/, TInt64& /*aPos*/)
    81 	{
    82 	return KErrCANotSupported;
    83 	}
    84 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
    85 
    86 EXPORT_C void CAgentData::ReadCancel(TRequestStatus&)
    87 	{	
    88 	}
    89 
    90 EXPORT_C void CAgentRightsManager::ListRightsL(RStreamablePtrArray<CRightsInfo>& /* aArray */, RFile& /* aFile */, const TDesC& /* aUniqueId */) const
    91 	{
    92 	User::Leave(KErrCANotSupported);
    93 	}
    94 
    95 EXPORT_C TInt CAgentRightsManager::DeleteAllRightsObjects (RFile& /* aFile */, const TDesC& /* aUniqueId */) 
    96 	{
    97 	return KErrCANotSupported;
    98 	}
    99 	
   100 EXPORT_C TInt CAgentManager::GetAttribute(TInt /* aAttribute */, TInt& /* aValue */, RFile& /* aFile */, const TDesC& /* aUniqueId */) 	
   101 	{
   102 	return KErrCANotSupported;
   103 	}
   104 	
   105 EXPORT_C TInt CAgentManager::GetAttributeSet(RAttributeSet& /* aAttributeSet */, RFile& /* aFile */, const TDesC& /* aUniqueId */) 
   106 	{
   107 	return KErrCANotSupported;
   108 	}
   109 	
   110 EXPORT_C TInt CAgentManager::GetStringAttribute(TInt /* aAttribute */, TDes& /* aValue */, RFile& /* aFile */, const TDesC& /* aUniqueId */) 
   111 	{
   112 	return KErrCANotSupported;
   113 	}	
   114 
   115 EXPORT_C TInt CAgentManager::GetStringAttributeSet(RStringAttributeSet& /* aStringAttributeSet */, RFile& /* aFile */, const TDesC& /* aUniqueId */) 
   116 	{
   117 	return KErrCANotSupported;
   118 	}
   119 
   120 EXPORT_C void CAgentManager::DisplayInfoL (TDisplayInfo /* aInfo */, RFile& /* aFile */, const TDesC& /* aUniqueId */)
   121 	{
   122 	User::Leave(KErrCANotSupported);
   123 	}
   124 
   125 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
   126 	
   127 EXPORT_C TInt CAgentData::Read(const TDesC8& /*aEncryptedInputDataPacket*/, TDes8& /*aDecryptedOutputDataPacket*/)
   128 	{
   129  	return KErrCANotSupported;
   130  	}
   131  	
   132 EXPORT_C void CAgentData::Read(const TDesC8& /*aEncryptedInputDataPacket*/, TDes8& /*aDecryptedOutputDataPacket*/, TRequestStatus& aStatus)
   133  	{
   134  	TRequestStatus* status = &aStatus;
   135   	User::RequestComplete(status, KErrCANotSupported);
   136  	}
   137  	
   138 EXPORT_C TBool CAgentManager::IsRecognizedL(const TDesC8& /*aHeaderData*/) const
   139  	{
   140   	return EFalse;
   141  	}
   142  	
   143 EXPORT_C TBool CAgentManager::RecognizeContentL(const TDesC8& /*aHeaderData*/, TDes8& aFileMimeType, TDes8& aContentMimeType) const
   144 	{
   145 	aFileMimeType.Copy(KNullDesC8());
   146 	aContentMimeType.Copy(KNullDesC8());
   147  	return EFalse;
   148 	}
   149 	
   150 EXPORT_C TInt CAgentManager::GetAttribute(const TDesC8& /*aHeaderData*/, TInt /*aAttribute*/, TInt& /*aValue*/)
   151 	{
   152 	return KErrCANotSupported;
   153 	}
   154 
   155 EXPORT_C TInt CAgentManager::GetAttributeSet(const TDesC8& /*aHeaderData*/, RAttributeSet& /*aAttributeSet*/)
   156 	{
   157 	return KErrCANotSupported;
   158 	}
   159 	
   160 EXPORT_C TInt CAgentManager::GetStringAttribute(const TDesC8& /*aHeaderData*/, TInt /*aAttribute*/, TDes& /*aValue*/)
   161 	{
   162 	return KErrCANotSupported;
   163 	}
   164 	
   165 EXPORT_C TInt CAgentManager::GetStringAttributeSet(const TDesC8& /*aHeaderData*/, RStringAttributeSet& /*aStringAttributeSet*/)
   166 	{
   167 	return KErrCANotSupported;
   168 	}
   169  	
   170 EXPORT_C CAgentData* CAgentFactory::CreateDataConsumerL(const TDesC8& /*aHeaderData*/)
   171  	{
   172  	User::Leave(KErrCANotSupported);
   173  	// cannot reach here. The return statement is added to avoid warning.
   174  	return NULL;
   175   	}
   176  		
   177 EXPORT_C CAgentContent* CAgentFactory::CreateContentBrowserL(const TDesC8& /*aHeaderData*/)
   178  	{
   179  	User::Leave(KErrCANotSupported);
   180  	// cannot be reach here . The return statement is added to avoid warning.
   181  	return NULL;
   182  	}
   183  	
   184 
   185 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT