2 * Copyright (c) 2012 Carsten Munk <carsten.munk@gmail.com>
3 * 2013 Simon Busch <morphis@gravedo.de>
4 * 2008 The Android Open Source Project
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
28 /* Based on Android */
29 #define PROP_SERVICE_NAME "property_service"
31 #define PROP_NAME_MAX 32
32 #define PROP_VALUE_MAX 92
34 /* Only SETPROP is defined by Android, for GETPROP and LISTPROP to work
35 * an extended Android init service needs to be in place */
36 #define PROP_MSG_SETPROP 1
37 #define PROP_MSG_GETPROP 2
38 #define PROP_MSG_LISTPROP 3
44 typedef struct prop_msg_s
{
46 char name
[PROP_NAME_MAX
];
47 char value
[PROP_VALUE_MAX
];
50 int property_set(const char *key
, const char *value
);
51 int property_get(const char *key
, char *value
, const char *default_value
);
52 int property_list(void (*propfn
)(const char *key
, const char *value
, void *cookie
), void *cookie
);
58 #endif // PROPERTIES_H_