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