• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 #ifndef __UNIT_TEST_TEST_ARGS__
19 #define __UNIT_TEST_TEST_ARGS__
20 
21 #include "unit_test_common.h"
22 
23 class cmd_line
24 {
25     public:
26 
~cmd_line()27         virtual ~cmd_line() {}
28 
29         virtual int get_count(void) = 0;
30 
31         virtual void setup(int count, oscl_wchar** cmd_argv) = 0;
32         virtual void setup(int count, char** cmd_argv) = 0;
33 
34 
35         virtual void get_arg(int n, char* &arg) = 0;
36 
37 
38         virtual void get_arg(int n, oscl_wchar* &arg) = 0;
39 
40         virtual bool is_wchar(void) = 0;
41 };
42 
43 
44 
45 class cmd_line_linux : public cmd_line
46 {
47     private:
48         char** argv;
49         int argc;
50 
51     public:
52         void setup(int count, oscl_wchar** cmd_argv);
53         void setup(int count, char** cmd_argv);
54 
55         int get_count(void);
56 
57         void get_arg(int n, char* &arg);
58         void get_arg(int n, oscl_wchar *&arg);
59 
60         bool is_wchar(void);
61 };
62 
63 
64 
65 #endif //__UNIT_TEST_TEST_ARGS__
66