devicediagnosticsfw/diagframework/inc/diagpluginconstructionparam.h
branchRCL_3
changeset 25 b183ec05bd8c
parent 24 13d7c31c74e0
child 26 19bba8228ff0
equal deleted inserted replaced
24:13d7c31c74e0 25:b183ec05bd8c
     1 /*
       
     2 * Copyright (c) 2007 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:  Diagnostics Plug-in Construction Parameter
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DIAGPLUGINCONSTRUCTIONPARAM_H
       
    20 #define DIAGPLUGINCONSTRUCTIONPARAM_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>            // CBase
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CDesC16ArrayFlat;
       
    27 
       
    28 /**
       
    29 * Parameters that are needed to construct a Diagnostics plug-in.
       
    30 *
       
    31 * @since S60 v5.0
       
    32 **/
       
    33 NONSHARABLE_CLASS( CDiagPluginConstructionParam ) : public CBase
       
    34     {
       
    35 public:
       
    36 
       
    37     /**
       
    38     * Two-phased constructors.
       
    39     *
       
    40     * @param    aServiceProvided - Name of the service provided.
       
    41     *           Ownership is transferred to CDiagPluginConstructionParam.
       
    42     * @param    aServicesRequired - Array of services required.
       
    43     *           Ownership is transferred to CDiagPluginConstructionParam.
       
    44     * @param    aOrder - Order that this plug-in should appear in
       
    45     *           in parent suite.
       
    46     * @param    aImplUid - Implementation Uid of the plug-in.
       
    47     * @return   new instance of CDiagPluginConstructionParam*
       
    48     **/
       
    49     IMPORT_C static CDiagPluginConstructionParam* NewL(
       
    50                                         HBufC*              aServiceProvided,
       
    51                                         CDesC16ArrayFlat*   aServicesRequired,
       
    52                                         TInt                aOrder,
       
    53                                         TUid                aImplUid,
       
    54                                         TUid                aParentUid );
       
    55     IMPORT_C static CDiagPluginConstructionParam* NewLC(
       
    56                                         HBufC*              aServiceProvided,
       
    57                                         CDesC16ArrayFlat*   aServicesRequired,
       
    58                                         TInt                aOrder,
       
    59                                         TUid                aImplUid,
       
    60                                         TUid                aParentUid );
       
    61 
       
    62     /**
       
    63     * Destructor.
       
    64     */
       
    65     IMPORT_C virtual ~CDiagPluginConstructionParam();
       
    66 
       
    67     /**
       
    68     * Get Name of the service provived.
       
    69     *
       
    70     * @return Name of the service provided.
       
    71     */
       
    72     IMPORT_C const TDesC& ServiceProvided() const;
       
    73 
       
    74     /**
       
    75     * Get array of services required for plug-in.
       
    76     *
       
    77     * @return Array of services required for plug-in.
       
    78     */
       
    79     IMPORT_C const CDesC16ArrayFlat& ServicesRequired() const;
       
    80 
       
    81     /**
       
    82     * Get the order this plug-in should appear in parent.
       
    83     *
       
    84     * @return Order that this plug-in should appear in parent.
       
    85     */
       
    86     IMPORT_C TInt Order() const;
       
    87 
       
    88     /**
       
    89     * Uid of plug-in.
       
    90     *
       
    91     * @return Uid of plug-in specified in RSS file.
       
    92     */
       
    93     IMPORT_C TUid Uid() const;
       
    94 
       
    95     /**
       
    96     * Parent Uid of plug-in.
       
    97     *
       
    98     * @return Parent Uid of plug-in specified in RSS file.
       
    99     */
       
   100     IMPORT_C TUid ParentUid() const;
       
   101 
       
   102 private:    
       
   103     
       
   104     /**
       
   105     * C++ Constructor.
       
   106     **/
       
   107     CDiagPluginConstructionParam( HBufC*              aServiceProvided,
       
   108                                   CDesC16ArrayFlat*   aServicesRequired,
       
   109                                   TInt                aOrder,
       
   110                                   TUid                aImplUid,
       
   111                                   TUid                aParentUid );
       
   112     
       
   113     
       
   114 private:    // data
       
   115 
       
   116     /**
       
   117     * iServiceProvided - Buffer containing service name
       
   118     * Owns.
       
   119     */
       
   120     HBufC* iServiceProvided;
       
   121 
       
   122     /**
       
   123     * iServicesRequired - Array containing list of dependency list.
       
   124     * Owns
       
   125     */
       
   126     CDesC16ArrayFlat* iServicesRequired;
       
   127 
       
   128     /**
       
   129     * iOrder - Order in parent list.
       
   130     */
       
   131     TInt iOrder;
       
   132 
       
   133     /**
       
   134     * iImplUid - Uid of the plug-in
       
   135     */
       
   136     TUid iImplUid;
       
   137 
       
   138     /**
       
   139     * iParentUid - Uid of the parent suite plug-ins
       
   140     */
       
   141     TUid iParentUid;
       
   142     };
       
   143 
       
   144 #endif // DIAGPLUGINCONSTRUCTIONPARAM_H
       
   145 
       
   146 // End of File
       
   147