contextframework/cfw/inc/cfscriptengine/cfscriptinfo.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2008-2008 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:  CCFScriptInfo class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CFSCRIPTINFO_H
       
    20 #define CFSCRIPTINFO_H
       
    21 
       
    22 // SYSTEM INCLUDE FILES
       
    23 #include <e32base.h>
       
    24 
       
    25 // USER INCLUDE FILES
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MCFScriptOwner;
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * Script information class.
       
    36  * Contains the basic information of the script.
       
    37  *
       
    38  * @lib None.
       
    39  * @since S60 5.0
       
    40  */
       
    41 NONSHARABLE_CLASS( CCFScriptInfo ): public CBase
       
    42     {
       
    43 public:
       
    44 
       
    45     /**
       
    46      * Symbian two phased constructors.
       
    47      *
       
    48      * @since S60 5.0
       
    49      * @param aName Script name.
       
    50      * @param aScriptId Script id.
       
    51      * @param aOwnerUid Script owner.
       
    52      * @param aLength Script length.
       
    53      * @param aScriptOwner Pointer to the owner session.
       
    54      * @return CCFScriptInfo*
       
    55      */
       
    56     static CCFScriptInfo* NewL( const TDesC& aName,
       
    57         TInt aScriptId,
       
    58         const TUid& aOwnerUid,
       
    59         TInt aLength,
       
    60         MCFScriptOwner* aScriptOwner );
       
    61     static CCFScriptInfo* NewLC( const TDesC& aName,
       
    62         TInt aScriptId,
       
    63         const TUid& aOwnerUid,
       
    64         TInt aLength,
       
    65         MCFScriptOwner* aScriptOwner );
       
    66 
       
    67     /**
       
    68      * C++ destructor.
       
    69      */
       
    70     virtual ~CCFScriptInfo( );
       
    71 
       
    72 public:
       
    73 
       
    74     /**
       
    75      * Return script name.
       
    76      * @return TPtrC
       
    77      */
       
    78     TPtrC Name() const;
       
    79     
       
    80     /**
       
    81      * Returns script id.
       
    82      * @return TInt.
       
    83      */
       
    84     TInt Id() const;
       
    85     
       
    86     /**
       
    87      * Return owner uid.
       
    88      * @return const TUid&.
       
    89      */
       
    90     const TUid& OwnerUid() const;
       
    91     
       
    92     /**
       
    93      * Return script length.
       
    94      * @return TInt.
       
    95      */
       
    96     TInt Length() const;
       
    97     
       
    98     /**
       
    99      * Script owner session.
       
   100      * @return MCFScriptOwner*.
       
   101      */
       
   102     MCFScriptOwner* OwnerSession() const;
       
   103     
       
   104     /**
       
   105      * Change script owner session.
       
   106      * @param MCFScriptOwner*.
       
   107      */
       
   108     void SetOwnerSession( MCFScriptOwner* aScriptOwner );
       
   109 
       
   110 private:
       
   111 
       
   112     CCFScriptInfo( TInt aScriptId,
       
   113         const TUid& aOwnerUid,
       
   114         TInt aLength,
       
   115         MCFScriptOwner* aScriptOwner );
       
   116     void ConstructL( const TDesC& aName );
       
   117 
       
   118 private: // Data
       
   119 
       
   120     /** Script name */
       
   121     HBufC* iName;
       
   122     
       
   123     /** Script ID */
       
   124     TInt iScriptId;
       
   125     
       
   126     /** Script owner */
       
   127     TUid iOwnerUid;
       
   128     
       
   129     /** Script length */
       
   130     TInt iLength;
       
   131     
       
   132     /** Script owner session */
       
   133     MCFScriptOwner* iScriptOwner;
       
   134     };
       
   135     
       
   136 // Info array typedef
       
   137 typedef RPointerArray<CCFScriptInfo> RScriptInfoArray;
       
   138 
       
   139 #endif // CFSCRIPTINFO_H
       
   140