aboutsummaryrefslogtreecommitdiffstats
path: root/android/user-config.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 19:30:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 19:30:32 -0800
commit8b23a6c7e1aee255004dd19098d4c2462b61b849 (patch)
tree7a4d682ba51f0ff0364c5ca2509f515bdaf96de9 /android/user-config.h
parentf721e3ac031f892af46f255a47d7f54a91317b30 (diff)
downloadexternal_qemu-8b23a6c7e1aee255004dd19098d4c2462b61b849.zip
external_qemu-8b23a6c7e1aee255004dd19098d4c2462b61b849.tar.gz
external_qemu-8b23a6c7e1aee255004dd19098d4c2462b61b849.tar.bz2
auto import from //depot/cupcake/@135843
Diffstat (limited to 'android/user-config.h')
-rw-r--r--android/user-config.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/android/user-config.h b/android/user-config.h
new file mode 100644
index 0000000..5fc6325
--- /dev/null
+++ b/android/user-config.h
@@ -0,0 +1,51 @@
+/* Copyright (C) 2009 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_USER_CONFIG_H
+#define _ANDROID_USER_CONFIG_H
+
+#include "android/avd/info.h"
+#include <stdint.h>
+
+/* a structure used to model the user-configuration settings
+ *
+ * At the moment, this is only used to store the last position
+ * of the emulator window and a unique 64-bit UUID. We might
+ * add more AVD-specific preferences here in the future.
+ *
+ * By definition, these settings should be optional and we
+ * should be able to work without them, unlike the AVD
+ * configuration information found in config.ini
+ */
+typedef struct AUserConfig AUserConfig;
+
+/* Create a new AUserConfig object from a given AvdInfo */
+AUserConfig* auserConfig_new( AvdInfo* info );
+
+/* Retrieve the unique UID for this AVD */
+uint64_t auserConfig_getUUID( AUserConfig* uconfig );
+
+/* Retrieve the stored window position for this AVD */
+void auserConfig_getWindowPos( AUserConfig* uconfig, int *pX, int *pY );
+
+/* Change the stored window position for this AVD */
+void auserConfig_setWindowPos( AUserConfig* uconfig, int x, int y );
+
+/* Save the user configuration back to the content directory.
+ * Should be used in an atexit() handler. This will effectively
+ * only save the user configuration to disk if its content
+ * has changed.
+ */
+void auserConfig_save( AUserConfig* uconfig );
+
+/* */
+
+#endif /* _ANDROID_USER_CONFIG_H */