1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/contentmgmt/contentaccessfwfordrm/source/f32agent/f32agentcontent.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,107 @@
1.4 +/*
1.5 +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @internalComponent
1.25 + @released
1.26 +*/
1.27 +
1.28 +#ifndef __F32AGENTCONTENT_H__
1.29 +#define __F32AGENTCONTENT_H__
1.30 +
1.31 +#include <f32file.h>
1.32 +#include <caf/agentinterface.h>
1.33 +
1.34 +namespace ContentAccess
1.35 + {
1.36 + class TVirtualPathPtr;
1.37 + class CF32AgentUi;
1.38 +
1.39 + /**
1.40 + F32 agent implementation of the CAgentContent class used to browse
1.41 + plaintext files. The browsing will not return any embedded objects since
1.42 + the F32 agent only enables access to the entire file
1.43 +
1.44 + @internalComponent
1.45 + @released
1.46 + */
1.47 + class CF32AgentContent : public CAgentContent
1.48 + {
1.49 + public:
1.50 + // Two phase constructor used when the file is opened
1.51 + // using a file name
1.52 + static CF32AgentContent* NewL(const TDesC& aURI, TContentShareMode aShareMode);
1.53 +
1.54 + // Two phase constructor used when the file is opened with
1.55 + // a file handle
1.56 + static CF32AgentContent* NewL(RFile& aFile);
1.57 +
1.58 +#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1.59 + static CF32AgentContent* NewL(const TDesC8& aHeaderData);
1.60 +#endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1.61 +
1.62 + virtual ~CF32AgentContent();
1.63 +
1.64 + public:
1.65 + // From CAgentContent
1.66 + virtual TInt OpenContainer(const TDesC& aUniqueId);
1.67 + virtual TInt CloseContainer();
1.68 + virtual void GetEmbeddedObjectsL(RStreamablePtrArray<CEmbeddedObject>& aArray);
1.69 + virtual void GetEmbeddedObjectsL(RStreamablePtrArray<CEmbeddedObject>& aArray, TEmbeddedType aType);
1.70 + virtual TInt Search(RStreamablePtrArray<CEmbeddedObject>& aArray, const TDesC8& aMimeType, TBool aRecursive);
1.71 + virtual TInt GetAttribute(TInt aAttribute, TInt& aValue, const TDesC& aUniqueId);
1.72 + virtual TInt GetAttributeSet(RAttributeSet& aAttributeSet, const TDesC& aUniqueId);
1.73 + virtual TInt GetStringAttribute(TInt aAttribute, TDes& aValue, const TDesC& aUniqueId);
1.74 + virtual TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, const TDesC& aUniqueId);
1.75 + virtual TInt AgentSpecificCommand(TInt aCommand, const TDesC8& aInputBuffer, TDes8& aOutputBuffer);
1.76 + virtual void AgentSpecificCommand(TInt aCommand, const TDesC8& aInputBuffer, TDes8& aOutputBuffer, TRequestStatus& aStatus);
1.77 + virtual void NotifyStatusChange(TEventMask aMask, TRequestStatus& aStatus, const TDesC& aUniqueId);
1.78 + virtual TInt CancelNotifyStatusChange(TRequestStatus& aStatus, const TDesC& aUniqueId);
1.79 + virtual void RequestRights(TRequestStatus& aStatus, const TDesC& aUniqueId);
1.80 + virtual TInt CancelRequestRights(TRequestStatus& aStatus, const TDesC& aUniqueId);
1.81 + virtual void DisplayInfoL(TDisplayInfo aInfo, const TDesC& aUniqueId);
1.82 + virtual TInt SetProperty(TAgentProperty aProperty, TInt aValue);
1.83 +
1.84 + private:
1.85 + CF32AgentContent();
1.86 + void ConstructL(const TDesC& aURI, TContentShareMode aShareMode);
1.87 + void ConstructL(RFile& aFile);
1.88 +#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1.89 + void ConstructL(const TDesC8& aHeaderData);
1.90 +#endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1.91 +
1.92 + CF32AgentUi& AgentUiL();
1.93 + void SearchL(RStreamablePtrArray<CEmbeddedObject>& aArray, const TDesC8& aMimeType, TBool aRecursive);
1.94 +
1.95 + private:
1.96 + HBufC* iURI;
1.97 + TContentShareMode iShareMode;
1.98 + RFs iFs;
1.99 +#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
1.100 + RFile64 iFile;
1.101 +#else
1.102 + RFile iFile;
1.103 +#endif //SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
1.104 + CF32AgentUi* iAgentUi;
1.105 +#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1.106 + HBufC8* iHeaderData;
1.107 +#endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1.108 + };
1.109 +} // namespace ContentAccess
1.110 +#endif // __F32AgentContent_H__