1 /*******************************************************************************
2 
3     KHOMP generic endpoint/channel library.
4     Copyright (C) 2007-2010 Khomp Ind. & Com.
5 
6   The contents of this file are subject to the Mozilla Public License
7   Version 1.1 (the "License"); you may not use this file except in compliance
8   with the License. You may obtain a copy of the License at
9   http://www.mozilla.org/MPL/
10 
11   Software distributed under the License is distributed on an "AS IS" basis,
12   WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
13   the specific language governing rights and limitations under the License.
14 
15   Alternatively, the contents of this file may be used under the terms of the
16   "GNU Lesser General Public License 2.1" license (the “LGPL" License), in which
17   case the provisions of "LGPL License" are applicable instead of those above.
18 
19   If you wish to allow use of your version of this file only under the terms of
20   the LGPL License and not to allow others to use your version of this file
21   under the MPL, indicate your decision by deleting the provisions above and
22   replace them with the notice and other provisions required by the LGPL
23   License. If you do not delete the provisions above, a recipient may use your
24   version of this file under either the MPL or the LGPL License.
25 
26   The LGPL header follows below:
27 
28     This library is free software; you can redistribute it and/or
29     modify it under the terms of the GNU Lesser General Public
30     License as published by the Free Software Foundation; either
31     version 2.1 of the License, or (at your option) any later version.
32 
33     This library is distributed in the hope that it will be useful,
34     but WITHOUT ANY WARRANTY; without even the implied warranty of
35     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36     Lesser General Public License for more details.
37 
38     You should have received a copy of the GNU Lesser General Public License
39     along with this library; if not, write to the Free Software Foundation,
40     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
41 
42 *******************************************************************************/
43 
44 #ifndef _SPEC_HPP_
45 #define _SPEC_HPP_
46 
47 #include <function.hpp>
48 #include "khomp_pvt.h"
49 
50 typedef enum
51 {
52     SPR_CONTINUE,
53     SPR_SUCCESS,
54     SPR_FAIL,
55 }
56 SpecRetType;
57 
58 typedef enum
59 {
60     SPF_FIRST  = 0x01,
61     SPF_CYCLIC = 0x02,
62 }
63 SpecFlagType;
64 
65 typedef unsigned int SpecFlagsType;
66 typedef Function::Function3 < bool, unsigned int, unsigned int, SpecFlagsType & > SpecFunType;
67 
68 /* Request a Board::KhompPvt based on dialplan string.
69 
70 -- Format of dialplan string. --
71 
72 Dial(Khomp/B2C58/4832625644)
73  |      |    |       |
74  |      |    |       |
75  |      |    |       |
76  |      |    |       +- Destination number.
77  |      |    |
78  |      |    +- Identifier for board 2, channel 58.
79  |      |
80  |      +- Khomp channel identifier.
81  |
82  +- Dial Application.
83 */
84 
85 Board::KhompPvt * processDialString(const char *, int *);
86 void processGroupString();
87 
88 Board::KhompPvt * processSMSString(const char *, int *);
89 
90 #endif /* _SPEC_HPP_ */
91 
92