upnpavcontrolpoint/avcpengineclient/inc/upnpavcpenginerfsclient.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /** @file
       
     2 * Copyright (c) 2005-2006 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 "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:  RUpnpAVCPEngineRFSClient
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_RUPNPAVCPENGINERFSCLIENT_H
       
    20 #define C_RUPNPAVCPENGINERFSCLIENT_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <in_sock.h>
       
    25 
       
    26 #include "upnpavcpengineclient.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CRsfwDirEnt;
       
    30 class CRsfwDirEntAttr;
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35 * Class provides function used by UPnPAccess plugin 
       
    36 * It makes possible to pass requests to AVCPEngine.
       
    37 */
       
    38 class RUpnpAVCPEngineRFSClient : public RUpnpAVCPEngineClient
       
    39 	{
       
    40 	public:
       
    41 		/**
       
    42 		* C++ default constructor.
       
    43 		*/		    
       
    44 		IMPORT_C RUpnpAVCPEngineRFSClient();
       
    45 		/**
       
    46 		* Requests for get directory listing
       
    47 		*
       
    48 		* @param aUUID UDN of MS
       
    49 		* @param aPathName path of directory
       
    50 		* @param aDirList array of directory to be updated
       
    51 		* @return KErrNone if successful, otherwise one of the other system-wide error codes
       
    52 		*/
       
    53 		IMPORT_C TInt GetDirectoryL(const TDesC8& aUUID, const TDesC& aPathName, RPointerArray<CRsfwDirEnt>& aDirList); 
       
    54 		/**
       
    55 		* Requests for get directory attribute
       
    56 		*
       
    57 		* @param aUUID UDN of MS
       
    58 		* @param aPathName path of directory
       
    59 		* @param aDirAtt structure to be updated
       
    60 		* @return KErrNone if successful, otherwise one of the other system-wide error codes
       
    61 		*/	
       
    62     	IMPORT_C TInt GetDirectoryAttributeL(const TDesC8& aUUID, const TDesC& aPathName, CRsfwDirEntAttr*& aDirAtt);
       
    63 		/**
       
    64 		* Requests for get file attribute
       
    65 		*
       
    66 		* @param aUUID UDN of MS
       
    67 		* @param aPathName path of file
       
    68 		* @param aDirAtt structure to be updated
       
    69 		* @return KErrNone if successful, otherwise one of the other system-wide error codes
       
    70 		*/	    
       
    71     	IMPORT_C TInt GetFileAttributeL(const TDesC8& aUUID, const TDesC& aPathName, CRsfwDirEntAttr*& aFileAtt);
       
    72 		/**
       
    73 		* Requests for get (download) file from MS and store it in local cached file
       
    74 		*
       
    75 		* @param aUUID UDN of MS
       
    76 		* @param aSrcPathName source file (MS)
       
    77 		* @param aDstPathName destination file (local)		
       
    78 		* @param aStart start position to read
       
    79 		* @param aLength length to read
       
    80 		* @param aRead number of byte that were read
       
    81 		* @return KErrNone if successful, otherwise one of the other system-wide error codes		
       
    82 		*/	
       
    83     	IMPORT_C TInt GetFileL(const TDesC8& aUUID, const TDesC& aSrcPathName, const TDesC& aDstPathName, 
       
    84     			TInt aStart, TInt aLength, TUint aFlags, TInt& aRead);
       
    85 		/**
       
    86 		* Requests for delete file
       
    87 		*
       
    88 		* @param aUUID UDN of MS
       
    89 		* @param aPathName path of file
       
    90 		* @return KErrNone if successful, otherwise one of the other system-wide error codes		
       
    91 		*/    
       
    92     	IMPORT_C TInt DeleteFileL(const TDesC8& aUUID, const TDesC& aPathName);
       
    93 		/**
       
    94 		* Requests for delete directory
       
    95 		*
       
    96 		* @param aUUID UDN of MS
       
    97 		* @param aPathName path of directory
       
    98 		* @return KErrNone if successful, otherwise one of the other system-wide error codes		
       
    99 		*/       
       
   100     	IMPORT_C TInt DeleteDirectoryL(const TDesC8& aUUID, const TDesC& aPathName);
       
   101 		/**
       
   102 		* Requests for create file
       
   103 		*
       
   104 		* @param aUUID UDN of MS
       
   105 		* @param aPathName path of file
       
   106 		* @return KErrNone if successful, otherwise one of the other system-wide error codes		
       
   107 		*/   
       
   108     	IMPORT_C TInt CreateFileL(const TDesC8& aUUID, const TDesC& aPathName);
       
   109 		/**
       
   110 		* Requests for create directory
       
   111 		*
       
   112 		* @param aUUID UDN of MS
       
   113 		* @param aPathName path of directory
       
   114 		* @return KErrNone if successful, otherwise one of the other system-wide error codes		
       
   115 		*/      
       
   116     	IMPORT_C TInt MakeDirectoryL(const TDesC8& aUUID, const TDesC& aPathName);
       
   117 		/**
       
   118 		* Requests for put (upload) file from local to MS 
       
   119 		*
       
   120 		* @param aUUID UDN of MS
       
   121 		* @param aSrcPathName source file (local)
       
   122 		* @param aDstPathName destination file (MS)	
       
   123 		* @return KErrNone if successful, otherwise one of the other system-wide error codes			
       
   124 		*/   
       
   125     	IMPORT_C TInt PutFileL(const TDesC8& aUUID, const TDesC& aSrcPathName, const TDesC& aDstPathName);     
       
   126 	private:
       
   127 		/**
       
   128 		* Convert information about attributes store in TFileInfo into CDirEntAttr
       
   129 		*
       
   130 		* @param aFileInfo file information
       
   131 		* @return converted object of CDirEntAttr
       
   132 		*/
       
   133 		CRsfwDirEntAttr* RUpnpAVCPEngineRFSClient::GetFileAttributesL(TFileInfo& aFileInfo);
       
   134 		/**
       
   135 		* Convert information about file store in TFileInfo into CDirEnt
       
   136 		*
       
   137 		* @param aFileInfo file information
       
   138 		* @return converted object of CDirEnt
       
   139 		*/
       
   140 		CRsfwDirEnt* RUpnpAVCPEngineRFSClient::GetFileInformationL(TFileInfo& aFileInfo);
       
   141 	};
       
   142 
       
   143 #endif // C_RUPNPAVCPENGINERFSCLIENT_H
       
   144 
       
   145 // End of File