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_HELP_H 13 #define _ANDROID_HELP_H 14 15 #include "android/utils/compiler.h" 16 #include "android/utils/stralloc.h" 17 18 ANDROID_BEGIN_HEADER 19 20 /* these values give the maximum length of system property 21 * names and values. They must match the definitions for PROPERTY_MAX_NAME and 22 * PROPERTY_MAX_VALUE in the Android source tree 23 * (in system/core/include/cutils/properties.h) 24 */ 25 #define BOOT_PROPERTY_MAX_NAME 32 26 #define BOOT_PROPERTY_MAX_VALUE 92 27 28 /* appends the list of options with a small description to a dynamic string */ 29 extern void android_help_list_options( stralloc_t* out ); 30 31 /* output main help screen into a single dynamic string */ 32 extern void android_help_main( stralloc_t* out ); 33 34 /* output all help into a single dynamic string */ 35 extern void android_help_all( stralloc_t* out ); 36 37 /* appends the help for a given command-line option into a dynamic string 38 * returns 0 on success, or -1 on error (i.e. unknown option) 39 */ 40 extern int android_help_for_option( const char* option, stralloc_t* out ); 41 42 /* appends the help for a given help topic into a dynamic string 43 * returns 0 on success, or -1 on error (i.e. unknown topic) 44 */ 45 extern int android_help_for_topic( const char* topic, stralloc_t* out ); 46 47 ANDROID_END_HEADER 48 49 #endif /* _ANDROID_HELP_H */ 50