+++ /dev/null
-/*
- * 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__ */
+++ /dev/null
-/*
- * 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__ */
+++ /dev/null
-/*
- * 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__ */
+++ /dev/null
-/*
- * 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__ */
--- /dev/null
+/*
+ * 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__ */
--- /dev/null
+/*
+ * 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__ */
--- /dev/null
+/*
+ * 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__ */
--- /dev/null
+/*
+ * 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__ */