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.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
#include <ecom/ecom.h>
sl@0
    21
#include <caf/agentfactory.h>
sl@0
    22
#include <caf/agentinterface.h>
sl@0
    23
#include <caf/caferr.h>
sl@0
    24
sl@0
    25
using namespace ContentAccess;
sl@0
    26
sl@0
    27
sl@0
    28
CAgentFactory* CAgentFactory::NewL(TUid aUid)
sl@0
    29
	{
sl@0
    30
	return static_cast<CAgentFactory*> (REComSession::CreateImplementationL(aUid, _FOFF(CAgentFactory,iEcomKey)));
sl@0
    31
	}
sl@0
    32
sl@0
    33
sl@0
    34
EXPORT_C CAgentFactory::~CAgentFactory()
sl@0
    35
	{
sl@0
    36
	// Finished with ECOM session so destroy implementation pointer
sl@0
    37
	// iEcomKey was set by ECOM during construction
sl@0
    38
	// This may cause the agent DLL to unload
sl@0
    39
	REComSession::DestroyedImplementation(iEcomKey);
sl@0
    40
	}
sl@0
    41
sl@0
    42
sl@0
    43
// default implementations
sl@0
    44
sl@0
    45
EXPORT_C TInt CAgentManager::RenameDir(const TDesC& /*aOldName*/, const TDesC& /* aNewName */)
sl@0
    46
	{
sl@0
    47
	return KErrCANotSupported;
sl@0
    48
	}
sl@0
    49
sl@0
    50
EXPORT_C void CAgentImportFile::Cancel()
sl@0
    51
	{
sl@0
    52
	// default implementation does nothing	
sl@0
    53
	}
sl@0
    54
EXPORT_C TBool CAgentImportFile::ContentMimeTypeL(TDes8& /*aContentMime*/)
sl@0
    55
	{
sl@0
    56
	User::Leave(KErrCANotSupported);
sl@0
    57
	return EFalse;
sl@0
    58
	}
sl@0
    59
EXPORT_C TInt CAgentManager::CopyFile(RFile& /* aSource */, const TDesC& /* aDestination */)
sl@0
    60
	{
sl@0
    61
	return KErrCANotSupported;
sl@0
    62
	}
sl@0
    63
sl@0
    64
EXPORT_C TInt CAgentData::Read(TInt /* aPos */, TDes8& /* aDes */, TInt /* aLength */, TRequestStatus& /* aStatus */)
sl@0
    65
	{
sl@0
    66
	return KErrCANotSupported;
sl@0
    67
	}
sl@0
    68
sl@0
    69
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
sl@0
    70
EXPORT_C TInt CAgentData::Read64(TInt64 /* aPos */, TDes8& /* aDes */, TInt /* aLength */, TRequestStatus& /* aStatus */)
sl@0
    71
	{
sl@0
    72
	return KErrCANotSupported;
sl@0
    73
	}
sl@0
    74
sl@0
    75
EXPORT_C void CAgentData::DataSize64L(TInt64& /*aSize*/)
sl@0
    76
	{
sl@0
    77
	User::Leave(KErrCANotSupported);
sl@0
    78
	}
sl@0
    79
sl@0
    80
EXPORT_C TInt CAgentData::Seek64(TSeek /*aMode*/, TInt64& /*aPos*/)
sl@0
    81
	{
sl@0
    82
	return KErrCANotSupported;
sl@0
    83
	}
sl@0
    84
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
sl@0
    85
sl@0
    86
EXPORT_C void CAgentData::ReadCancel(TRequestStatus&)
sl@0
    87
	{	
sl@0
    88
	}
sl@0
    89
sl@0
    90
EXPORT_C void CAgentRightsManager::ListRightsL(RStreamablePtrArray<CRightsInfo>& /* aArray */, RFile& /* aFile */, const TDesC& /* aUniqueId */) const
sl@0
    91
	{
sl@0
    92
	User::Leave(KErrCANotSupported);
sl@0
    93
	}
sl@0
    94
sl@0
    95
EXPORT_C TInt CAgentRightsManager::DeleteAllRightsObjects (RFile& /* aFile */, const TDesC& /* aUniqueId */) 
sl@0
    96
	{
sl@0
    97
	return KErrCANotSupported;
sl@0
    98
	}
sl@0
    99
	
sl@0
   100
EXPORT_C TInt CAgentManager::GetAttribute(TInt /* aAttribute */, TInt& /* aValue */, RFile& /* aFile */, const TDesC& /* aUniqueId */) 	
sl@0
   101
	{
sl@0
   102
	return KErrCANotSupported;
sl@0
   103
	}
sl@0
   104
	
sl@0
   105
EXPORT_C TInt CAgentManager::GetAttributeSet(RAttributeSet& /* aAttributeSet */, RFile& /* aFile */, const TDesC& /* aUniqueId */) 
sl@0
   106
	{
sl@0
   107
	return KErrCANotSupported;
sl@0
   108
	}
sl@0
   109
	
sl@0
   110
EXPORT_C TInt CAgentManager::GetStringAttribute(TInt /* aAttribute */, TDes& /* aValue */, RFile& /* aFile */, const TDesC& /* aUniqueId */) 
sl@0
   111
	{
sl@0
   112
	return KErrCANotSupported;
sl@0
   113
	}	
sl@0
   114
sl@0
   115
EXPORT_C TInt CAgentManager::GetStringAttributeSet(RStringAttributeSet& /* aStringAttributeSet */, RFile& /* aFile */, const TDesC& /* aUniqueId */) 
sl@0
   116
	{
sl@0
   117
	return KErrCANotSupported;
sl@0
   118
	}
sl@0
   119
sl@0
   120
EXPORT_C void CAgentManager::DisplayInfoL (TDisplayInfo /* aInfo */, RFile& /* aFile */, const TDesC& /* aUniqueId */)
sl@0
   121
	{
sl@0
   122
	User::Leave(KErrCANotSupported);
sl@0
   123
	}
sl@0
   124
sl@0
   125
#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
sl@0
   126
	
sl@0
   127
EXPORT_C TInt CAgentData::Read(const TDesC8& /*aEncryptedInputDataPacket*/, TDes8& /*aDecryptedOutputDataPacket*/)
sl@0
   128
	{
sl@0
   129
 	return KErrCANotSupported;
sl@0
   130
 	}
sl@0
   131
 	
sl@0
   132
EXPORT_C void CAgentData::Read(const TDesC8& /*aEncryptedInputDataPacket*/, TDes8& /*aDecryptedOutputDataPacket*/, TRequestStatus& aStatus)
sl@0
   133
 	{
sl@0
   134
 	TRequestStatus* status = &aStatus;
sl@0
   135
  	User::RequestComplete(status, KErrCANotSupported);
sl@0
   136
 	}
sl@0
   137
 	
sl@0
   138
EXPORT_C TBool CAgentManager::IsRecognizedL(const TDesC8& /*aHeaderData*/) const
sl@0
   139
 	{
sl@0
   140
  	return EFalse;
sl@0
   141
 	}
sl@0
   142
 	
sl@0
   143
EXPORT_C TBool CAgentManager::RecognizeContentL(const TDesC8& /*aHeaderData*/, TDes8& aFileMimeType, TDes8& aContentMimeType) const
sl@0
   144
	{
sl@0
   145
	aFileMimeType.Copy(KNullDesC8());
sl@0
   146
	aContentMimeType.Copy(KNullDesC8());
sl@0
   147
 	return EFalse;
sl@0
   148
	}
sl@0
   149
	
sl@0
   150
EXPORT_C TInt CAgentManager::GetAttribute(const TDesC8& /*aHeaderData*/, TInt /*aAttribute*/, TInt& /*aValue*/)
sl@0
   151
	{
sl@0
   152
	return KErrCANotSupported;
sl@0
   153
	}
sl@0
   154
sl@0
   155
EXPORT_C TInt CAgentManager::GetAttributeSet(const TDesC8& /*aHeaderData*/, RAttributeSet& /*aAttributeSet*/)
sl@0
   156
	{
sl@0
   157
	return KErrCANotSupported;
sl@0
   158
	}
sl@0
   159
	
sl@0
   160
EXPORT_C TInt CAgentManager::GetStringAttribute(const TDesC8& /*aHeaderData*/, TInt /*aAttribute*/, TDes& /*aValue*/)
sl@0
   161
	{
sl@0
   162
	return KErrCANotSupported;
sl@0
   163
	}
sl@0
   164
	
sl@0
   165
EXPORT_C TInt CAgentManager::GetStringAttributeSet(const TDesC8& /*aHeaderData*/, RStringAttributeSet& /*aStringAttributeSet*/)
sl@0
   166
	{
sl@0
   167
	return KErrCANotSupported;
sl@0
   168
	}
sl@0
   169
 	
sl@0
   170
EXPORT_C CAgentData* CAgentFactory::CreateDataConsumerL(const TDesC8& /*aHeaderData*/)
sl@0
   171
 	{
sl@0
   172
 	User::Leave(KErrCANotSupported);
sl@0
   173
 	// cannot reach here. The return statement is added to avoid warning.
sl@0
   174
 	return NULL;
sl@0
   175
  	}
sl@0
   176
 		
sl@0
   177
EXPORT_C CAgentContent* CAgentFactory::CreateContentBrowserL(const TDesC8& /*aHeaderData*/)
sl@0
   178
 	{
sl@0
   179
 	User::Leave(KErrCANotSupported);
sl@0
   180
 	// cannot be reach here . The return statement is added to avoid warning.
sl@0
   181
 	return NULL;
sl@0
   182
 	}
sl@0
   183
 	
sl@0
   184
sl@0
   185
#endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT