photosgallery/collectionframework/datasource/manager/inc/glxcommandrequest.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:    Command request
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef GLXCOMMANDREQUEST_H_
       
    22 #define GLXCOMMANDREQUEST_H_
       
    23 
       
    24 // INCLUDES
       
    25 #include <glxmediaid.h>
       
    26 #include <mpxcommand.h>
       
    27 
       
    28 #include "glxrequest.h"
       
    29 #include "mglxdatasourceupdateobserver.h"
       
    30 // FORWARD DECLARATIONS
       
    31 
       
    32 // CONSTANTS
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  *  CGlxCommandRequest class 
       
    38  *
       
    39  *  @internal reviewed 11/07/2007 by Dave Schofield
       
    40  */
       
    41 class CGlxCommandRequest : public CGlxRequest
       
    42 	{
       
    43 public:
       
    44 	/** 
       
    45 	 * Two-phase constructor: 
       
    46 	 * @param aCommand the MPX command to be requested.
       
    47 	 * @param aCollectionPluginUid The UID of the calling collection plugin.
       
    48 	 * @param aObserver Oberver to inform of progress notifications
       
    49 	 */
       
    50 	static CGlxCommandRequest* NewL(const CMPXCommand& aCommand, const TUid aCollectionPluginUid, MGlxDataSourceUpdateObserver& aObserver);
       
    51 
       
    52 	/**
       
    53 	 * Destructor
       
    54 	 */
       
    55 	~CGlxCommandRequest();
       
    56 	
       
    57 	/**
       
    58 	 * Returns a reference to the CMPXCommand object.
       
    59 	 * @return a reference to the CMPXCommand object.
       
    60 	 */
       
    61 	inline const CMPXCommand& Command() const;
       
    62 	
       
    63 	/**
       
    64 	 * Returns a reference to the MGlxDataSourceUpdateObserver passed in on construction.
       
    65 	 * @return a reference to the MGlxDataSourceUpdateObserver passed in on construction.
       
    66 	 */
       
    67 	inline MGlxDataSourceUpdateObserver& DataSourceUpdateObserver();
       
    68 	
       
    69 private:
       
    70 	/**
       
    71 	 * Constructor.
       
    72 
       
    73 	 * @param aCollectionPluginUid The UID of the calling collection plugin.
       
    74 	 * @param aObserver Oberver to inform of progress notifications
       
    75 	 */
       
    76 	CGlxCommandRequest(TUid aCollectionPluginUid, MGlxDataSourceUpdateObserver& aObserver);
       
    77 	
       
    78 	/**
       
    79 	 * Second stage constructor.
       
    80 	 * @param aCommand the MPX command to be requested.
       
    81 	 */
       
    82 	void ConstructL(const CMPXCommand& aCommand);
       
    83 
       
    84 private:
       
    85 	/**
       
    86 	 * a CMpxCommand
       
    87 	 * (owned)
       
    88 	 */
       
    89 	CMPXCommand* iCommand;
       
    90 	
       
    91 	/**
       
    92 	 * Data source update observer. 
       
    93 	 * Used for progress updates.
       
    94 	 */
       
    95 	MGlxDataSourceUpdateObserver& iDataSourceUpdateObserver;
       
    96 	};
       
    97 
       
    98 #include "glxcommandrequest.inl"
       
    99 
       
   100 #endif // GLXCOMMANDREQUEST_H_
       
   101