Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/hwcplus/include/cutils/properties.h

Issue 252583002: Make it possible to build libhardware. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hwc2
Patch Set: clean up more lint Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 The Android Open Source Project 2 * Copyright (C) 2006 The Android Open Source Project
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at 6 * You may obtain a copy of the License at
7 * 7 *
8 * http://www.apache.org/licenses/LICENSE-2.0 8 * http://www.apache.org/licenses/LICENSE-2.0
9 * 9 *
10 * Unless required by applicable law or agreed to in writing, software 10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, 11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17 #ifndef __CUTILS_PROPERTIES_H 17 #ifndef __CUTILS_PROPERTIES_H
18 #define __CUTILS_PROPERTIES_H 18 #define __CUTILS_PROPERTIES_H
19 19
20 #include <sys/cdefs.h> 20 #include <sys/cdefs.h>
21 #include <stddef.h> 21 #include <stddef.h>
22 #include <sys/system_properties.h>
rjkroege 2014/04/25 21:28:07 could you introduce a #define to leave this also c
23 22
24 #ifdef __cplusplus 23 #ifdef __cplusplus
25 extern "C" { 24 extern "C" {
26 #endif 25 #endif
27 26
28 /* System properties are *small* name value pairs managed by the 27 /* System properties are *small* name value pairs managed by the
29 ** property service. If your data doesn't fit in the provided 28 ** property service. If your data doesn't fit in the provided
30 ** space it is not appropriate for a system property. 29 ** space it is not appropriate for a system property.
31 ** 30 **
32 ** WARNING: system/bionic/include/sys/system_properties.h also defines 31 ** WARNING: system/bionic/include/sys/system_properties.h also defines
33 ** these, but with different names. (TODO: fix that) 32 ** these, but with different names. (TODO: fix that)
34 */ 33 */
35 #define PROPERTY_KEY_MAX PROP_NAME_MAX 34 #define PROPERTY_KEY_MAX 32
36 #define PROPERTY_VALUE_MAX PROP_VALUE_MAX 35 #define PROPERTY_VALUE_MAX 92
37 36
38 /* property_get: returns the length of the value which will never be 37 /* property_get: returns the length of the value which will never be
39 ** greater than PROPERTY_VALUE_MAX - 1 and will always be zero terminated. 38 ** greater than PROPERTY_VALUE_MAX - 1 and will always be zero terminated.
40 ** (the length does not include the terminating zero). 39 ** (the length does not include the terminating zero).
41 ** 40 **
42 ** If the property read fails or returns an empty value, the default 41 ** If the property read fails or returns an empty value, the default
43 ** value is used (if nonnull). 42 ** value is used (if nonnull).
44 */ 43 */
45 int property_get(const char *key, char *value, const char *default_value); 44 int property_get(const char *key, char *value, const char *default_value);
46 45
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 kSystemPropertyList 80 kSystemPropertyList
82 }; 81 };
83 #endif /*HAVE_SYSTEM_PROPERTY_SERVER*/ 82 #endif /*HAVE_SYSTEM_PROPERTY_SERVER*/
84 83
85 84
86 #ifdef __cplusplus 85 #ifdef __cplusplus
87 } 86 }
88 #endif 87 #endif
89 88
90 #endif 89 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/hwcplus/include/stub.h » ('j') | third_party/hwcplus/include/system/graphics.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698