CRsfwRemoteAccess Class Reference
class CRsfwRemoteAccess : public CBase |
Class for accessing files via a file transport protocol, like WebDAV.
rsfwcommon.lib
- Since
- Series 60 3.1
The derived classes are supposed to be registered and instantiated by using the the ECOM architecture.
Public Member Functions |
---|
| ~CRsfwRemoteAccess() |
void | Cancel(TUint) |
void | Cancel(TDesC &) |
TUint
| CreateFileL(const TDesC &, TBool, MRsfwRemoteAccessResponseHandler *) |
TUint
| DeleteDirectoryL(const TDesC &, MRsfwRemoteAccessResponseHandler *) |
TUint
| DeleteFileL(const TDesC &, MRsfwRemoteAccessResponseHandler *) |
TUint
| GetDirectoryAttributesL(const TDesC &, CRsfwDirEntAttr *&, MRsfwRemoteAccessResponseHandler *) |
TUint
| GetDirectoryL(const TDesC &, RPointerArray< CRsfwDirEnt > &, MRsfwRemoteAccessResponseHandler *) |
TUint
| GetFileAttributesL(const TDesC &, CRsfwDirEntAttr *&, MRsfwRemoteAccessResponseHandler *) |
TUint
| GetFileL(const TDesC &, const TDesC &, TInt, TInt *, TUint, MRsfwRemoteAccessResponseHandler *) |
IMPORT_C TInt | GetQuotaAndSizeL(TInt &, TInt &) |
TUint
| MakeDirectoryL(const TDesC &, MRsfwRemoteAccessResponseHandler *) |
IMPORT_C CRsfwRemoteAccess * | NewL(const TDesC8 &) |
TUint
| ObtainLockL(const TDesC &, TUint, TUint &, TDesC8 *&, MRsfwRemoteAccessResponseHandler *) |
TUint
| OpenL(const TUriC &, const TDesC &, const TDesC &, const TDesC &, const TDesC &, MRsfwRemoteAccessResponseHandler *) |
TUint
| PutFileL(const TDesC &, const TDesC &, const TDesC8 &, TInt, TInt, TInt, MRsfwRemoteAccessResponseHandler *) |
TUint
| PutFileL(const TDesC &, const TDesC &, const TDesC8 &, MRsfwRemoteAccessResponseHandler *) |
TUint
| RefreshLockL(const TDesC &, TUint &, MRsfwRemoteAccessResponseHandler *) |
TUint
| ReleaseLockL(const TDesC &, MRsfwRemoteAccessResponseHandler *) |
TUint
| RenameL(const TDesC &, const TDesC &, TBool, MRsfwRemoteAccessResponseHandler *) |
TUint
| SetAttributesL(const TDesC &, CRsfwDirEntAttr &, MRsfwRemoteAccessResponseHandler *) |
TInt
| SetLockToken(const TDesC &, const TDesC8 &) |
void | SetupL(MRsfwRemoteAccessObserver *) |
Constructor & Destructor Documentation
~CRsfwRemoteAccess()
IMPORT_C | ~CRsfwRemoteAccess | ( | ) | [virtual] |
Member Functions Documentation
Cancel(TUint)
void | Cancel | ( | TUint | aId | ) | [pure virtual] |
Cancels a transaction Eventually the HandleRemoteAccessResponseL will be called with status KErrCancel
Parameters
TUint aId | the identifier of the transaction to be canceled. If aId is zero, all pending requests are cancelled. |
Cancel(TDesC &)
void | Cancel | ( | TDesC & | aTargetPath | ) | [pure virtual] |
Cancels a transaction Eventually the HandleRemoteAccessResponseL will be called with status KErrCancel
Parameters
TDesC & aTargetPath | the path of the target file or directory for the operation that shall be cancelled |
CreateFileL(const TDesC &, TBool, MRsfwRemoteAccessResponseHandler *)
Creates an empty file on the remote server
Parameters
const TDesC & aPathName | path name of the new file |
TBool aOverWriting | whether we are overwriting an existing file Note that the semantics of this operation is such that it must always overwrite an existing file. This boolean is for information. If the protocol requires additional parameter to allow overwriting, the parameter should be set if aOverWriting is TRUE. |
MRsfwRemoteAccessResponseHandler * aResponseHandler | response handler |
DeleteDirectoryL(const TDesC &, MRsfwRemoteAccessResponseHandler *)
DeleteFileL(const TDesC &, MRsfwRemoteAccessResponseHandler *)
GetDirectoryAttributesL(const TDesC &, CRsfwDirEntAttr *&, MRsfwRemoteAccessResponseHandler *)
Gets attributes of the directory given by aPathName parameter. This function may also be called if the type of the object is not yet known (e.g., the object could be a file).
Parameters
const TDesC & aPathName | path name of the directory |
CRsfwDirEntAttr *& aAttr | A pointer to the attribute object to be filled. This attribute is set to point to a newly created CRsfwDirEntAttr object that will contain the directory attributes. In the created attribute object, pointers to descriptors for meta-data items that are not available or that are irrelevant are set to NULL value. The ownership of the object is transferred to the caller. If the attributes cannot be defined, the pointer will be set to NULL. |
MRsfwRemoteAccessResponseHandler * aResponseHandler | response handler |
GetDirectoryL(const TDesC &, RPointerArray< CRsfwDirEnt > &, MRsfwRemoteAccessResponseHandler *)
Gets contents of the directory given by aPathName parameter.
GetFileAttributesL(const TDesC &, CRsfwDirEntAttr *&, MRsfwRemoteAccessResponseHandler *)
Gets attributes of the file given by aPathName parameter.
Parameters
const TDesC & aPathName | path name of the file |
CRsfwDirEntAttr *& aAttr | A pointer to the attribute object to be filled. This attribute is set to point to a newly created CRsfwDirEntAttr object that will contain the file attributes. In the created attribute object, pointers to descriptors for meta-data items that are not available or that are irrelevant are set to NULL value. The ownership of the object is transferred to the caller. If the attributes cannot be defined, the pointer will be set to NULL. |
MRsfwRemoteAccessResponseHandler * aResponseHandler | response handler |
GetFileL(const TDesC &, const TDesC &, TInt, TInt *, TUint, MRsfwRemoteAccessResponseHandler *)
Gets a remote file and copies it to a local file. Note that byte ranges are not be implemented by all file access protocols. A non-zero aLength means partial get. Caller can assume that either aLength remains intact in which case byte range offset + aLength was fetched, or aLength is reset to the full length of the file, in which case aOffset is meaningless.
Parameters
const TDesC & aRemotePathName | path name of the remote file |
const TDesC & aLocalPathName | path name of the local file |
TInt aOffset | offset of the first byte to be accessed |
TInt * aLength | length of data to be accessed/was accessed (on entry NULL or zero value means fetching the whole file - on exit contains the length of fetched data, unless the pointer is NULL) |
TUint aFlags | operation qualifier. The following flags have been defined: KRemoteAccessOptionGetToStartOfFile: even if an offset is specified the fetched data is still put at the beginning of the local file. |
MRsfwRemoteAccessResponseHandler * aResponseHandler | response handler |
GetQuotaAndSizeL(TInt &, TInt &)
IMPORT_C TInt | GetQuotaAndSizeL | ( | TInt & | aQuota, |
| TInt & | aSize |
| ) | [virtual] |
Parameters
TInt & aQuota | The maximum size of the drive for this user in bytes, |
TInt & aSize | The amount of free space for this user on the disk in bytes. |
MakeDirectoryL(const TDesC &, MRsfwRemoteAccessResponseHandler *)
NewL(const TDesC8 &)
Parameters
const TDesC8 & aProtocol | protocol name, like "http", "https", or "ftp" |
ObtainLockL(const TDesC &, TUint, TUint &, TDesC8 *&, MRsfwRemoteAccessResponseHandler *)
Obtains a lock for the given file system object Note that this function is not be implemented by all file access protocols (e.g. FTP), some protocols only implement write locking (e.g. WebDAV).
Parameters
const TDesC & aPathName | path name of the object to be locked |
TUint aLockFlags | indicates whether a write or read lock is requested |
TUint & aTimeout | the timeout that is requested and granted (in seconds) |
TDesC8 *& aLockToken | acquired lock token - the caller gets ownership |
MRsfwRemoteAccessResponseHandler * aResponseHandler | response handler |
OpenL(const TUriC &, const TDesC &, const TDesC &, const TDesC &, const TDesC &, MRsfwRemoteAccessResponseHandler *)
Opens a connection to the server given by aServerName parameter.
Parameters
const TUriC & aUri | URI of the remote repository. The URI must not contain authority part (user name/password) |
const TDesC & aFriendlyName | friendly name for the server (for possible access control dialog) (can be empty) |
const TDesC & aUserName | user name for access control (can be empty) |
const TDesC & aPassword | password for access control (can be empty) |
const TDesC & aAuxData | auxiliary parameters for connection setup (eg IAP info) |
MRsfwRemoteAccessResponseHandler * aResponseHandler | response handler |
PutFileL(const TDesC &, const TDesC &, const TDesC8 &, TInt, TInt, TInt, MRsfwRemoteAccessResponseHandler *)
Puts a range of a file to the server. A non-zero aLength means partial file putting. The access protocol/server doesn't have to support partial file putting. In this case, it should return KErrNotSupported (if aLength is not zero)
Parameters
const TDesC & aLocalPathName | path name of the local file |
const TDesC & aRemotePathName | path name of the remote file |
const TDesC8 & aMimeType | |
TInt aOffset | offset of the first byte to be accessed |
TInt aLength | length of data to be accessed/was accessed (NULL/0=all) |
TInt aTotalLength | total length of the file, set to 0 if not known |
MRsfwRemoteAccessResponseHandler * aResponseHandler | response handler |
PutFileL(const TDesC &, const TDesC &, const TDesC8 &, MRsfwRemoteAccessResponseHandler *)
Puts a file to the server.
RefreshLockL(const TDesC &, TUint &, MRsfwRemoteAccessResponseHandler *)
Refreshes the lock of the given file system object Note that this function is not be implemented by all file access protocols (e.g. FTP).
ReleaseLockL(const TDesC &, MRsfwRemoteAccessResponseHandler *)
Releases the lock of the given file system object Note that this function is not be implemented by all file access protocols (e.g. FTP).
RenameL(const TDesC &, const TDesC &, TBool, MRsfwRemoteAccessResponseHandler *)
Renames a file or a directory. (may involve movement to another directory).
Parameters
const TDesC & aSrcPathName | path name of the object to be renamed |
const TDesC & aDstPathName | new path name of the object |
TBool aOverwrite | allow overwriting an existing object |
MRsfwRemoteAccessResponseHandler * aResponseHandler | response handler |
SetAttributesL(const TDesC &, CRsfwDirEntAttr &, MRsfwRemoteAccessResponseHandler *)
Sets attributes of the file or directory given by aPathName parameter. This function is typically only used for files and even then the implementation may do nothing since standard file attributes are implied by the contents of the file or set in conjunction with other operations on the file system object.
SetLockToken(const TDesC &, const TDesC8 &)
TInt
| SetLockToken | ( | const TDesC & | aPathName, |
| const TDesC8 & | aLockToken |
| ) | [pure virtual] |
Sets lock token for the a given resource This lock token value replaces any previously cached token value
Parameters
const TDesC & aPathName | path name |
const TDesC8 & aLockToken | lock token |
SetupL(MRsfwRemoteAccessObserver *)
Set up parameters for operation.
Parameters
MRsfwRemoteAccessObserver * aRsfwRemoteAccessObserver | MRsfwRemoteAccessObserver for receiving asynchronous events from the accessor plugin, e.g. changes in connectivity. This parameter may be NULL |
Member Data Documentation
TUid
iDtor_ID_Key
TUid
| iDtor_ID_Key | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.