~ubuntu-branches/ubuntu/lucid/sip-tester/lucid

« back to all changes in this revision

Viewing changes to actions.hpp

  • Committer: Bazaar Package Importer
  • Author(s): ARAKI Yasuhiro
  • Date: 2005-04-11 11:53:53 UTC
  • Revision ID: james.westby@ubuntu.com-20050411115353-o33qn3noyjwjgnpd
Tags: upstream-1.1rc1
ImportĀ upstreamĀ versionĀ 1.1rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  This program is free software; you can redistribute it and/or modify
 
3
 *  it under the terms of the GNU General Public License as published by
 
4
 *  the Free Software Foundation; either version 2 of the License, or
 
5
 *  (at your option) any later version.
 
6
 *
 
7
 *  This program is distributed in the hope that it will be useful,
 
8
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
 *  GNU General Public License for more details.
 
11
 *
 
12
 *  You should have received a copy of the GNU General Public License
 
13
 *  along with this program; if not, write to the Free Software
 
14
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
 *
 
16
 *  Authors : Benjamin GAUTHIER - 24 Mar 2004
 
17
 *            Joseph BANINO
 
18
 *            Olivier JACQUES
 
19
 *            Richard GAYRAUD
 
20
 *            From Hewlett Packard Company.
 
21
 *           
 
22
 */
 
23
 
 
24
#ifndef _CACTIONS
 
25
#define _CACTIONS
 
26
 
 
27
class CAction
 
28
{
 
29
  public:
 
30
    enum T_ActionType
 
31
    {
 
32
      E_AT_NO_ACTION = 0,
 
33
      E_AT_ASSIGN_FROM_REGEXP,
 
34
      E_AT_CHECK,
 
35
      E_AT_ASSIGN_FROM_VALUE,
 
36
      E_AT_LOG_TO_FILE,
 
37
      E_AT_EXECUTE_CMD,
 
38
      E_AT_EXEC_INTCMD,
 
39
      E_AT_NB_ACTION
 
40
    };
 
41
 
 
42
    enum T_VarType
 
43
    {
 
44
      E_VT_REGEXP = 0,
 
45
      E_VT_CONST,
 
46
      E_VT_UNDEFINED,
 
47
      E_VT_NB_VAR_TYPE
 
48
    };
 
49
 
 
50
    enum T_LookingPlace
 
51
    {
 
52
      E_LP_MSG = 0,
 
53
      E_LP_HDR,
 
54
      E_LP_NB_LOOKING_PLACE
 
55
    };
 
56
 
 
57
    enum T_IntCmdType
 
58
    {
 
59
      E_INTCMD_INVALID = 0,
 
60
      E_INTCMD_STOPCALL,
 
61
      E_INTCMD_STOP_ALL,
 
62
      E_INTCMD_STOP_NOW
 
63
    };
 
64
 
 
65
    typedef struct _T_Action
 
66
    {
 
67
    } T_Action;
 
68
 
 
69
    void afficheInfo();
 
70
 
 
71
    T_ActionType   getActionType();
 
72
    T_VarType      getVarType();  
 
73
    T_LookingPlace getLookingPlace();
 
74
    bool           getCheckIt();
 
75
    int            getVarId();
 
76
    char*          getLookingChar();
 
77
    char*          getMessage();  /* log specific function  */
 
78
    char*          getCmdLine();  /* exec specific function */
 
79
    T_IntCmdType   getIntCmd();   /* exec specific function */
 
80
 
 
81
    void setActionType   (T_ActionType   P_value);
 
82
    void setVarType      (T_VarType      P_value);  
 
83
    void setLookingPlace (T_LookingPlace P_value);
 
84
    void setCheckIt      (bool           P_value);
 
85
    void setVarId        (int            P_value);
 
86
    void setLookingChar  (char*          P_value);
 
87
    void setAction       (CAction        P_action);
 
88
    void setMessage      (char*          P_value);  /* log specific function  */
 
89
    void setCmdLine      (char*          P_value);  /* exec specific function */
 
90
    void setIntCmd       (T_IntCmdType   P_type );  /* exec specific function */
 
91
 
 
92
    void setSubVarId     (int P_value);
 
93
    int  getSubVarId     (int P_index);
 
94
    void setNbSubVarId   (int P_value);
 
95
    int  getNbSubVarId   ();
 
96
    int* getSubVarId() ;
 
97
    
 
98
    CAction(const CAction &P_Action);
 
99
    CAction();
 
100
    ~CAction();
 
101
  
 
102
  private:
 
103
      T_ActionType   M_action;
 
104
      T_VarType      M_varType;
 
105
      T_LookingPlace M_lookingPlace;
 
106
      bool           M_checkIt;
 
107
      int            M_varId;
 
108
 
 
109
      int            M_nbSubVarId;
 
110
      int            M_maxNbSubVarId;
 
111
      int *          M_subVarId;
 
112
 
 
113
      char*          M_lookingChar;
 
114
      /* log specific member  */
 
115
      char*          M_message;
 
116
      /* exec specific member */
 
117
      char*          M_cmdLine;
 
118
      T_IntCmdType   M_IntCmd;
 
119
};
 
120
 
 
121
class CActions
 
122
{
 
123
  public:
 
124
    void afficheInfo();
 
125
    void setAction(CAction P_action);
 
126
    void reset();
 
127
    int  getUsedAction();
 
128
    int  getMaxSize();
 
129
    CAction* getAction(int i);
 
130
    CActions(const CActions &P_Actions);
 
131
    CActions(int P_nbAction);
 
132
    ~CActions();
 
133
  
 
134
  private:
 
135
    CAction*   M_actionList;
 
136
    int        M_nbAction;
 
137
    int        M_currentSettedAction;
 
138
};
 
139
 
 
140
#endif