• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

Revisiona08f7ae3c10f4874194fb48ff549e846e39217b7 (tree)
Time2011-06-19 03:21:59
AuthorJean-Baptiste Queru <jbq@goog...>
CommiterAndroid Code Review

Log Message

Merge "tweak for forward-compatibility"

Change Summary

Incremental Difference

--- /dev/null
+++ b/include/cutils/str_parms.h
@@ -0,0 +1,49 @@
1+/*
2+ * Copyright (C) 2011 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (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
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+#ifndef __CUTILS_STR_PARMS_H
18+#define __CUTILS_STR_PARMS_H
19+
20+#include <stdint.h>
21+
22+struct str_parms;
23+
24+struct str_parms *str_parms_create(void);
25+struct str_parms *str_parms_create_str(const char *_string);
26+void str_parms_destroy(struct str_parms *str_parms);
27+
28+void str_parms_del(struct str_parms *str_parms, const char *key);
29+
30+int str_parms_add_str(struct str_parms *str_parms, const char *key,
31+ const char *value);
32+int str_parms_add_int(struct str_parms *str_parms, const char *key, int value);
33+
34+int str_parms_add_float(struct str_parms *str_parms, const char *key,
35+ float value);
36+
37+int str_parms_get_str(struct str_parms *str_parms, const char *key,
38+ char *out_val, int len);
39+int str_parms_get_int(struct str_parms *str_parms, const char *key,
40+ int *out_val);
41+int str_parms_get_float(struct str_parms *str_parms, const char *key,
42+ float *out_val);
43+
44+char *str_parms_to_str(struct str_parms *str_parms);
45+
46+/* debug */
47+void str_parms_dump(struct str_parms *str_parms);
48+
49+#endif /* __CUTILS_STR_PARMS_H */