upnpavcontrolpoint/avcpengine/inc/upnpmetadatacommand.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:  Used for get/change metadata from/in MS
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CUPNPMETADATACOMMAND_H
       
    20 #define C_CUPNPMETADATACOMMAND_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "upnpcommand.h"
       
    24 #include "upnpresponsehandler.h"
       
    25 #include "upnpresolverobserver.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CUpnpPathResolver;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 * Class responsible for operating on MS's metadata.
       
    33 * It is used for get/change file/directory metadata
       
    34 *
       
    35 *  @since Series 60 3.1
       
    36 */
       
    37 class CUpnpMetadataCommand : public CUpnpCommand, public MUpnpResponseHandler, 
       
    38                                           public MUpnpResolverObserver
       
    39 {
       
    40 	public:	
       
    41 		/**
       
    42 		* Two-phased constructor.
       
    43 		*
       
    44 		* @param aAVCPManager manager
       
    45 		* @param aSession server-side session
       
    46 		* @param aMessage message
       
    47 		*/		
       
    48 		static CUpnpMetadataCommand* NewL(CUpnpAVCPManager& aAVCPManager, 
       
    49 			CUpnpAVCPEngineSession& aSession, const RMessage2& aMessage);	       
       
    50 		/**
       
    51 		* Destructor.
       
    52 		*/			
       
    53 		virtual ~CUpnpMetadataCommand();	       	
       
    54 		
       
    55 	public:	// Method from CUpnpCommand
       
    56 		/**
       
    57 		* From CUpnpCommand returns session id.
       
    58 		* It is also defined in MUpnpResponseHandler, MUpnpHttpResponseHandler
       
    59 		* @since Series 60 3.1
       
    60 		*/	
       
    61 		TInt SessionId();
       
    62 		/**
       
    63 		* From CUpnpCommand implement logic for leaves that appear during InterpretL.
       
    64 		* It is also defined in MUpnpResponseHandler, MUpnpHttpResponseHandler
       
    65 		* @since Series 60 3.1
       
    66 		*/	
       
    67 		void RunError(TInt aErrorCode);		
       
    68 		/**
       
    69 		* From CUpnpCommand perfroms operation connected with command
       
    70 		* @since Series 60 3.1
       
    71 		*/			
       
    72 		void ExecuteL();
       
    73 		/**
       
    74 		* From CUpnpCommand it is empty implementation.
       
    75 		* @since Series 60 3.1
       
    76 		*/				
       
    77 		void SetResultL(const RMessage2& aMessage);	
       
    78 		
       
    79 	public:	// Method from observers	
       
    80 		/**
       
    81 		* From MUpnpResponseHandler, it is notified when SOAP respone 
       
    82 		* with relevant session id comes.
       
    83 		* @param aErrorCode error code
       
    84 		* @param aAction action with attached respone
       
    85 		* @since Series 60 3.1
       
    86 		*/	
       
    87 		void InterpretL(TInt aErrorCode, CUpnpAction* aAction);
       
    88 		/**
       
    89 		* From MUpnpResolverObserver, it is notified after translation path into id.
       
    90 		* 
       
    91 		* @param aErrorCode error code (KErrNone if Ok)
       
    92 		* @param aIdElement object describing searched element
       
    93 		* @since Series 60 3.1
       
    94 		*/		
       
    95 		void ResolvedIdL(TInt aErrCode, CUpnpPathElement* aIdElement);	
       
    96 		
       
    97 	private:
       
    98 		/**
       
    99 		* C++ default constructor.
       
   100 		*/		
       
   101 		CUpnpMetadataCommand(CUpnpAVCPManager& aAVCPManager, 
       
   102 			CUpnpAVCPEngineSession& aSession, const RMessage2& aMessage);			
       
   103 		/**
       
   104 		* Symbian 2nd phase constructor.
       
   105 		*/				
       
   106 		void ConstructL();
       
   107 
       
   108 	private: // Data
       
   109 		// path resolver
       
   110 		CUpnpPathResolver* iPathResolver;
       
   111 		// object id taken from path specified by request				
       
   112 		HBufC8* iObjectId;	
       
   113 		// result from browse, waiting for request about result			            
       
   114     HBufC8* iResult;
       
   115     // old metadata
       
   116     HBufC8* iOldMetadata;
       
   117     // new changed metadata
       
   118     HBufC8* iNewMetadata;
       
   119         
       
   120 };
       
   121 
       
   122 #endif //C_CUPNPMETADATACOMMAND_H