blob: 6fba00acecde655db0f26adee4232394a23f5d49 [file] [log] [blame]
The Android Open Source Project8b23a6c2009-03-03 19:30:32 -08001/* 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
David 'Digit' Turner318e4f22009-05-25 18:01:03 +020015/* a structure used to model a linked list of parameters
16 */
17typedef struct ParamList {
18 char* param;
19 struct ParamList* next;
20} ParamList;
21
The Android Open Source Project8b23a6c2009-03-03 19:30:32 -080022/* define a structure that will hold all option variables
23 */
24typedef struct {
David 'Digit' Turner318e4f22009-05-25 18:01:03 +020025#define OPT_LIST(n,t,d) ParamList* n;
The Android Open Source Project8b23a6c2009-03-03 19:30:32 -080026#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 */
36extern int
37android_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
The Android Open Source Project8b23a6c2009-03-03 19:30:32 -080046#endif /* _ANDROID_OPTION_H */