• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (C) 2008 The Android Open Source Project
2 **
3 ** This software is licensed under the terms of the GNU General Public
4 ** License version 2, as published by the Free Software Foundation, and
5 ** may be copied, distributed, and modified under those terms.
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 #ifndef _ANDROID_OPTION_H
13 #define _ANDROID_OPTION_H
14 
15 /* a structure used to model a linked list of parameters
16  */
17 typedef struct ParamList {
18     char*              param;
19     struct ParamList*  next;
20 } ParamList;
21 
22 /* define a structure that will hold all option variables
23  */
24 typedef struct {
25 #define OPT_LIST(n,t,d)    ParamList*  n;
26 #define OPT_PARAM(n,t,d)   char*  n;
27 #define OPT_FLAG(n,d)      int    n;
28 #include "android/cmdline-options.h"
29 } AndroidOptions;
30 
31 
32 /* parse command-line arguments options and remove them from (argc,argv)
33  * 'opt' will be set to the content of parsed options
34  * returns 0 on success, -1 on error (unknown option)
35  */
36 extern int
37 android_parse_options( int  *pargc, char**  *pargv, AndroidOptions*  opt );
38 
39 /* name of default keyset file */
40 #define  KEYSET_FILE    "default.keyset"
41 
42 /* the default device DPI if none is specified by the skin
43  */
44 #define  DEFAULT_DEVICE_DPI  165
45 
46 #endif /* _ANDROID_OPTION_H */
47