diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:43:59 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:43:59 -0800 |
commit | c27f813900a3c114562efbb8df1065e94766fc48 (patch) | |
tree | d95919283707dcab61009e27007374a745c9541e /android/avd/hw-config.h | |
parent | 0852ad57fa372f9b2854e4df685eaba8d8ef6790 (diff) | |
download | external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.zip external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.gz external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.bz2 |
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'android/avd/hw-config.h')
-rw-r--r-- | android/avd/hw-config.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/android/avd/hw-config.h b/android/avd/hw-config.h new file mode 100644 index 0000000..05eb828 --- /dev/null +++ b/android/avd/hw-config.h @@ -0,0 +1,46 @@ +/* Copyright (C) 2008 The Android Open Source Project +** +** This software is licensed under the terms of the GNU General Public +** License version 2, as published by the Free Software Foundation, and +** may be copied, distributed, and modified under those terms. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +*/ +#ifndef _ANDROID_AVD_HW_CONFIG_H +#define _ANDROID_AVD_HW_CONFIG_H + +#include <stdint.h> +#include "android/utils/ini.h" + +typedef char hw_bool_t; +typedef int hw_int_t; +typedef int64_t hw_disksize_t; +typedef char* hw_string_t; +typedef double hw_double_t; + +/* these macros are used to define the fields of AndroidHwConfig + * declared below + */ +#define HWCFG_BOOL(n,s,d,a,t) hw_bool_t n; +#define HWCFG_INT(n,s,d,a,t) hw_int_t n; +#define HWCFG_STRING(n,s,d,a,t) hw_string_t n; +#define HWCFG_DOUBLE(n,s,d,a,t) hw_double_t n; +#define HWCFG_DISKSIZE(n,s,d,a,t) hw_disksize_t n; + +typedef struct { +#include "android/avd/hw-config-defs.h" +} AndroidHwConfig; + +/* reads a hardware configuration file from disk. + * returns -1 if the file could not be read, or 0 in case of success. + * + * note that default values are written to hwConfig if the configuration + * file doesn't have the corresponding hardware properties. + */ +int androidHwConfig_read( AndroidHwConfig* hwConfig, + IniFile* configFile ); + +#endif /* _ANDROID_AVD_HW_CONFIG_H */ |