Move internal headers to src directory 39/98639/1 accepted/tizen/3.0/common/20161123.140607 accepted/tizen/3.0/ivi/20161123.083218 accepted/tizen/3.0/mobile/20161123.083119 accepted/tizen/3.0/tv/20161123.083146 accepted/tizen/3.0/wearable/20161123.083202 accepted/tizen/common/20161125.095118 accepted/tizen/ivi/20161125.004133 accepted/tizen/mobile/20161125.003542 accepted/tizen/tv/20161125.003901 accepted/tizen/wearable/20161125.004015 submit/tizen/20161124.000829 submit/tizen_3.0/20161122.021326
authorJiwoong Im <jiwoong.im@samsung.com>
Fri, 18 Nov 2016 05:06:33 +0000 (14:06 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Fri, 18 Nov 2016 05:06:33 +0000 (14:06 +0900)
Change-Id: I2e2877bd0bdb5205fcfaa3bcd5b18f5d3c626c72
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
include/bundle_log.h [deleted file]
include/keyval.h [deleted file]
include/keyval_array.h [deleted file]
include/keyval_type.h [deleted file]
src/bundle_log.h [new file with mode: 0755]
src/keyval.h [new file with mode: 0755]
src/keyval_array.h [new file with mode: 0755]
src/keyval_type.h [new file with mode: 0755]

diff --git a/include/bundle_log.h b/include/bundle_log.h
deleted file mode 100755 (executable)
index b3bda77..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __BUNDLE_LOG_H__
-#define __BUNDLE_LOG_H__
-
-#include <dlog/dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-
-#define LOG_TAG "BUNDLE"
-
-#ifdef _DEBUG_MODE_
-#define BUNDLE_LOG_PRINT(FMT, ARG...) \
-       do { \
-               printf("%5d", getpid()); \
-               printf("%s() : "FMT"\n", __FUNCTION__, ##ARG); \
-       } while (0)
-
-#define BUNDLE_EXCEPTION_PRINT(FMT, ARG...) \
-       do { \
-               printf("%5d", getpid()); \
-               printf("%s() : "FMT"\n", __FUNCTION__, ##ARG); \
-       } while (0)
-
-#define BUNDLE_ASSERT_PRINT(FMT, ARG...) \
-       do { \
-               printf("%5d", getpid()); \
-               printf("%s() : "FMT"\n", __FUNCTION__, ##ARG); \
-       } while (0)
-#else
-#define BUNDLE_LOG_PRINT(FMT, ARG...) SLOGD(FMT, ##ARG);
-#define BUNDLE_EXCEPTION_PRINT(FMT, ARG...) SLOGW(FMT, ##ARG);
-#define BUNDLE_ASSERT_PRINT(FMT, ARG...) SLOGE(FMT, ##ARG);
-#endif /* _DEBUG_MODE_ */
-
-#endif /* __BUNDLE_LOG_H__ */
diff --git a/include/keyval.h b/include/keyval.h
deleted file mode 100755 (executable)
index 459c4ac..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __KEYVAL_H__
-#define __KEYVAL_H__
-
-/**
- * keyval.h
- *
- * keyval object
- */
-
-#include <stddef.h>
-
-/* ADT: object */
-typedef struct keyval_t keyval_t;
-
-/* Object methods */
-typedef struct keyval_method_collection_t keyval_method_collection_t;
-
-typedef void (*keyval_method_free_t)(keyval_t *kv, int do_free_object);
-typedef int (*keyval_method_compare_t) (keyval_t *kv1, keyval_t *kv2);
-typedef size_t (*keyval_method_get_encoded_size_t)(keyval_t *kv);
-typedef size_t (*keyval_method_encode_t)(
-               keyval_t *,
-               unsigned char **byte,
-               size_t *byte_len);
-typedef size_t (*keyval_method_decode_t)(unsigned char *byte, keyval_t **kv);
-
-struct keyval_method_collection_t {
-       keyval_method_free_t free;
-       keyval_method_compare_t compare;
-       keyval_method_get_encoded_size_t get_encoded_size;
-       keyval_method_encode_t encode;
-       keyval_method_decode_t decode;
-};
-
-struct keyval_t {
-       int type;
-       char *key;      /* To be freed. */
-       void *val;      /* To be freed. */
-       size_t size;    /* Size of a single value. */
-       struct keyval_t *next;
-       keyval_method_collection_t *method;
-};
-
-keyval_t * keyval_new(keyval_t *kv, const char *key,
-               const int type, const void *val, const size_t size);
-void keyval_free(keyval_t *kv, int do_free_object);
-int keyval_compare(keyval_t *kv1, keyval_t *kv2);
-size_t keyval_get_encoded_size(keyval_t *kv);
-size_t keyval_encode(keyval_t *kv, unsigned char **byte, size_t *byte_len);
-size_t keyval_decode(unsigned char *byte, keyval_t **kv);
-int keyval_get_data(keyval_t *kv, int *type, void **val, size_t *size);
-int keyval_get_type_from_encoded_byte(unsigned char *byte);
-
-#endif /* __KEYVAL_H__ */
diff --git a/include/keyval_array.h b/include/keyval_array.h
deleted file mode 100755 (executable)
index 47b38a9..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __KEYVAL_ARRAY_H__
-#define __kEYVAL_ARRAY_H__
-
-/**
- * keyval_array.h
- *
- * keyval_array object
- */
-
-#include "keyval.h"
-
-typedef struct keyval_array_t {
-       struct keyval_t kv; /* Inherits keyval_t */
-       unsigned int len; /* length of array_val */
-       size_t  *array_element_size; /* Array of size of each element */
-       void **array_val; /* Array */
-} keyval_array_t;
-
-keyval_array_t *keyval_array_new(keyval_array_t *kva, const char *key,
-               const int type, const void **array_val, const unsigned int len);
-void keyval_array_free(keyval_array_t *kva, int do_free_object);
-int keyval_array_compare(keyval_array_t *kva1, keyval_array_t *kva2);
-size_t keyval_array_get_encoded_size(keyval_array_t *kva);
-size_t keyval_array_encode(keyval_array_t *kva, void **byte, size_t *byte_len);
-size_t keyval_array_decode(void *byte, keyval_array_t **kva);
-int keyval_array_copy_array(keyval_array_t *kva, void **array_val,
-               unsigned int array_len, size_t (*measure_val_len)(void * val));
-int keyval_array_get_data(keyval_array_t *kva, int *type, void ***array_val,
-               unsigned int *len, size_t **array_element_size);
-int keyval_array_set_element(keyval_array_t *kva,
-               int idx, void *val, size_t size);
-int keyval_array_is_idx_valid(keyval_array_t *kva, int idx);
-
-#endif /* __KEYVAL_ARRAY_H__ */
diff --git a/include/keyval_type.h b/include/keyval_type.h
deleted file mode 100755 (executable)
index 3d9ff15..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __KEYVAL_TYPE_H__
-#define __KEYVAL_TYPE_H__
-
-/**
- * keyval_type.h
- *
- * Definitions & short funcs for keyval type
- */
-
-#include <stddef.h>
-#include <string.h>
-
-#include "bundle.h"
-
-/* measure_size function type */
-typedef size_t (*keyval_type_measure_size_func_t) (void *val);
-
-void _type_init_measure_size_func(void);
-int keyval_type_is_array(int type);
-int keyval_type_is_measurable(int type);
-keyval_type_measure_size_func_t keyval_type_get_measure_size_func(int type);
-
-/* Measure functions for each type */
-size_t keyval_type_measure_size_str(void *val);
-void keyval_type_init(void);
-
-#endif /* __KEYVAL_TYPE_H__ */
diff --git a/src/bundle_log.h b/src/bundle_log.h
new file mode 100755 (executable)
index 0000000..b3bda77
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __BUNDLE_LOG_H__
+#define __BUNDLE_LOG_H__
+
+#include <dlog/dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+#define LOG_TAG "BUNDLE"
+
+#ifdef _DEBUG_MODE_
+#define BUNDLE_LOG_PRINT(FMT, ARG...) \
+       do { \
+               printf("%5d", getpid()); \
+               printf("%s() : "FMT"\n", __FUNCTION__, ##ARG); \
+       } while (0)
+
+#define BUNDLE_EXCEPTION_PRINT(FMT, ARG...) \
+       do { \
+               printf("%5d", getpid()); \
+               printf("%s() : "FMT"\n", __FUNCTION__, ##ARG); \
+       } while (0)
+
+#define BUNDLE_ASSERT_PRINT(FMT, ARG...) \
+       do { \
+               printf("%5d", getpid()); \
+               printf("%s() : "FMT"\n", __FUNCTION__, ##ARG); \
+       } while (0)
+#else
+#define BUNDLE_LOG_PRINT(FMT, ARG...) SLOGD(FMT, ##ARG);
+#define BUNDLE_EXCEPTION_PRINT(FMT, ARG...) SLOGW(FMT, ##ARG);
+#define BUNDLE_ASSERT_PRINT(FMT, ARG...) SLOGE(FMT, ##ARG);
+#endif /* _DEBUG_MODE_ */
+
+#endif /* __BUNDLE_LOG_H__ */
diff --git a/src/keyval.h b/src/keyval.h
new file mode 100755 (executable)
index 0000000..459c4ac
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __KEYVAL_H__
+#define __KEYVAL_H__
+
+/**
+ * keyval.h
+ *
+ * keyval object
+ */
+
+#include <stddef.h>
+
+/* ADT: object */
+typedef struct keyval_t keyval_t;
+
+/* Object methods */
+typedef struct keyval_method_collection_t keyval_method_collection_t;
+
+typedef void (*keyval_method_free_t)(keyval_t *kv, int do_free_object);
+typedef int (*keyval_method_compare_t) (keyval_t *kv1, keyval_t *kv2);
+typedef size_t (*keyval_method_get_encoded_size_t)(keyval_t *kv);
+typedef size_t (*keyval_method_encode_t)(
+               keyval_t *,
+               unsigned char **byte,
+               size_t *byte_len);
+typedef size_t (*keyval_method_decode_t)(unsigned char *byte, keyval_t **kv);
+
+struct keyval_method_collection_t {
+       keyval_method_free_t free;
+       keyval_method_compare_t compare;
+       keyval_method_get_encoded_size_t get_encoded_size;
+       keyval_method_encode_t encode;
+       keyval_method_decode_t decode;
+};
+
+struct keyval_t {
+       int type;
+       char *key;      /* To be freed. */
+       void *val;      /* To be freed. */
+       size_t size;    /* Size of a single value. */
+       struct keyval_t *next;
+       keyval_method_collection_t *method;
+};
+
+keyval_t * keyval_new(keyval_t *kv, const char *key,
+               const int type, const void *val, const size_t size);
+void keyval_free(keyval_t *kv, int do_free_object);
+int keyval_compare(keyval_t *kv1, keyval_t *kv2);
+size_t keyval_get_encoded_size(keyval_t *kv);
+size_t keyval_encode(keyval_t *kv, unsigned char **byte, size_t *byte_len);
+size_t keyval_decode(unsigned char *byte, keyval_t **kv);
+int keyval_get_data(keyval_t *kv, int *type, void **val, size_t *size);
+int keyval_get_type_from_encoded_byte(unsigned char *byte);
+
+#endif /* __KEYVAL_H__ */
diff --git a/src/keyval_array.h b/src/keyval_array.h
new file mode 100755 (executable)
index 0000000..47b38a9
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __KEYVAL_ARRAY_H__
+#define __kEYVAL_ARRAY_H__
+
+/**
+ * keyval_array.h
+ *
+ * keyval_array object
+ */
+
+#include "keyval.h"
+
+typedef struct keyval_array_t {
+       struct keyval_t kv; /* Inherits keyval_t */
+       unsigned int len; /* length of array_val */
+       size_t  *array_element_size; /* Array of size of each element */
+       void **array_val; /* Array */
+} keyval_array_t;
+
+keyval_array_t *keyval_array_new(keyval_array_t *kva, const char *key,
+               const int type, const void **array_val, const unsigned int len);
+void keyval_array_free(keyval_array_t *kva, int do_free_object);
+int keyval_array_compare(keyval_array_t *kva1, keyval_array_t *kva2);
+size_t keyval_array_get_encoded_size(keyval_array_t *kva);
+size_t keyval_array_encode(keyval_array_t *kva, void **byte, size_t *byte_len);
+size_t keyval_array_decode(void *byte, keyval_array_t **kva);
+int keyval_array_copy_array(keyval_array_t *kva, void **array_val,
+               unsigned int array_len, size_t (*measure_val_len)(void * val));
+int keyval_array_get_data(keyval_array_t *kva, int *type, void ***array_val,
+               unsigned int *len, size_t **array_element_size);
+int keyval_array_set_element(keyval_array_t *kva,
+               int idx, void *val, size_t size);
+int keyval_array_is_idx_valid(keyval_array_t *kva, int idx);
+
+#endif /* __KEYVAL_ARRAY_H__ */
diff --git a/src/keyval_type.h b/src/keyval_type.h
new file mode 100755 (executable)
index 0000000..3d9ff15
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __KEYVAL_TYPE_H__
+#define __KEYVAL_TYPE_H__
+
+/**
+ * keyval_type.h
+ *
+ * Definitions & short funcs for keyval type
+ */
+
+#include <stddef.h>
+#include <string.h>
+
+#include "bundle.h"
+
+/* measure_size function type */
+typedef size_t (*keyval_type_measure_size_func_t) (void *val);
+
+void _type_init_measure_size_func(void);
+int keyval_type_is_array(int type);
+int keyval_type_is_measurable(int type);
+keyval_type_measure_size_func_t keyval_type_get_measure_size_func(int type);
+
+/* Measure functions for each type */
+size_t keyval_type_measure_size_str(void *val);
+void keyval_type_init(void);
+
+#endif /* __KEYVAL_TYPE_H__ */