upnpavcontroller/upnprenderingstatemachine/inc/upnprenderingoperation.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
       
     1 /*
       
     2 * Copyright (c) 2007,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:  A rendering operation modeled as a class
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_UPNPRENDERINGOPERATION_H
       
    19 #define C_UPNPRENDERINGOPERATION_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include "upnprenderingstatemachineconstants.h"
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 /**
       
    30  * Abstract class that represents an internal operation on the
       
    31  * rendering state machine
       
    32  */
       
    33 NONSHARABLE_CLASS( TUpnpRenderingOperation )
       
    34     {
       
    35     public: // construction/destruction
       
    36 
       
    37         // constructor with command, int param and an untyped pointed
       
    38         inline TUpnpRenderingOperation( Upnp::TCommand aCmd,
       
    39             TInt aParam = 0, const TAny* aData = NULL );
       
    40 
       
    41         // constructor
       
    42         inline TUpnpRenderingOperation( Upnp::TCommand aCmd,
       
    43             const TAny* aData );
       
    44 
       
    45     public: // assignment
       
    46 
       
    47         /**
       
    48          * operator set
       
    49          */
       
    50         inline TUpnpRenderingOperation operator=( 
       
    51             Upnp::TCommand aCmd );
       
    52         /**
       
    53          * operator set
       
    54          */
       
    55         inline TUpnpRenderingOperation operator=( 
       
    56             const TUpnpRenderingOperation& aOther );
       
    57 
       
    58     public: // comparison
       
    59 
       
    60         /**
       
    61          * operator equals
       
    62 		 *
       
    63          * @return boolean
       
    64          */
       
    65         inline TBool operator==( Upnp::TCommand aCmd ) const;
       
    66 
       
    67         /**
       
    68          * operator not equal
       
    69 		 *
       
    70          * @return boolean
       
    71          */
       
    72         inline TBool operator!=( Upnp::TCommand aCmd ) const;
       
    73 
       
    74         /**
       
    75          * operator equals
       
    76 		 *
       
    77          * @return boolean
       
    78          */
       
    79         inline TBool operator==( 
       
    80             const TUpnpRenderingOperation& aOther ) const;
       
    81 
       
    82         /**
       
    83          * operator not equal
       
    84 		 *
       
    85          * @return boolean
       
    86          */
       
    87         inline TBool operator!=( 
       
    88             const TUpnpRenderingOperation& aOther ) const;
       
    89 
       
    90     public: // convenience methods
       
    91 
       
    92         /**
       
    93          * IsValid
       
    94          * 
       
    95          * @return boolean
       
    96          */
       
    97         inline TBool IsValid() const;
       
    98 
       
    99         /**
       
   100          * IsUserOriented
       
   101          * 
       
   102          * @return boolean
       
   103          */
       
   104         inline TBool IsUserOriented() const;
       
   105 
       
   106     public: // member access
       
   107 
       
   108         // the command id (const)
       
   109         inline const Upnp::TCommand& Command() const;
       
   110 
       
   111         // any command-related parameter (const)
       
   112         inline TInt& Param();
       
   113 
       
   114         // any command-related parameter
       
   115         inline const TInt& Param() const;
       
   116 
       
   117         // any command-related pointer data (const)
       
   118         inline const TAny* Data() const;
       
   119 
       
   120         // command user-oriented or not
       
   121         inline void SetUserOriented( TBool aUserOriented );
       
   122 
       
   123     private: // members
       
   124 
       
   125         // the command ID
       
   126         Upnp::TCommand iCmd;
       
   127 
       
   128         // any parameter
       
   129         TInt iParam;
       
   130 
       
   131         // any data
       
   132         const TAny* iData;
       
   133 
       
   134         // whether this was by user's request
       
   135         TBool iUserOriented;
       
   136     };
       
   137 
       
   138 #include "upnprenderingoperation.inl"
       
   139 
       
   140 #endif // C_UPNPRENDERINGOPERATION_H
       
   141