telephonyprotocols/csdagt/script/SVARLAB.H
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /**
       
     2 * Copyright (c) 2003-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:
       
    15 * Variable and Label Store/Retrieve Header
       
    16 * 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file Svarlab.h
       
    24  @internalComponent
       
    25 */
       
    26 
       
    27 #ifndef __SVARLAB_H__
       
    28 #define __SVARLAB_H__
       
    29 
       
    30 #include "SSCRREAD.H"
       
    31 
       
    32 const TInt KMaxLabelLength=20;
       
    33 const TInt KMaxVarNameLength=20;
       
    34 
       
    35 struct TLabel
       
    36 	{
       
    37 	TBuf<KMaxLabelLength> iName;
       
    38 	TLinePosition iPosition;
       
    39 	};
       
    40 
       
    41 
       
    42 class CScriptLabelMan : public CBase
       
    43 /**
       
    44 One of these per CScriptExecutor.  Manages the list of labels used by the script.
       
    45 
       
    46 @internalComponent
       
    47 */
       
    48 	{
       
    49 public:
       
    50 	static CScriptLabelMan* NewL();
       
    51 	~CScriptLabelMan();
       
    52 	void AddLabelL(const TDesC& aLabel,const TLinePosition& aPosition);
       
    53 	TInt FindLabel(const TDesC& aLabelName,TLinePosition& aPosition);
       
    54 	void DeleteAll();
       
    55 private:
       
    56 	CScriptLabelMan();
       
    57 	void ConstructL();
       
    58 private:
       
    59 	CArrayFixFlat<TLabel>* iLabelArray;
       
    60 	};
       
    61 
       
    62 struct TVar
       
    63 	{
       
    64 	TBuf<KMaxVarNameLength> iName;
       
    65 	HBufC* iContent;
       
    66 	};
       
    67 
       
    68 
       
    69 class CScriptVarMan : public CBase
       
    70 /**
       
    71 One of these per CScriptExecutor. Manages a list of variables used by the script.
       
    72 
       
    73 @internalComponent
       
    74 */
       
    75 	{
       
    76 public:
       
    77 	static CScriptVarMan* NewL();
       
    78 	~CScriptVarMan();
       
    79 
       
    80 	void AddVariableL(const TDesC& aName,const TDesC& aContent);
       
    81 	void AddVariableL(const TDesC& aName,TInt aVal);
       
    82 	TInt FindVariable(const TDesC& aName,TPtrC& aContent);
       
    83 	void DeleteAll();
       
    84 private:
       
    85 	CScriptVarMan();
       
    86 	void ConstructL();
       
    87 private:
       
    88 	TInt iIndex;
       
    89 	CArrayFixFlat<TVar>* iVarArray;
       
    90 	};
       
    91 
       
    92 #endif