summaryrefslogtreecommitdiff
path: root/build-util
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-16 19:06:08 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-16 19:06:08 +0900
commit2fe4ba6f7e660a945ed94559110c76852c5edd47 (patch)
tree1c3b126230f27c8e1451b5669a2e7f760be29fe1 /build-util
parenta1311c9da85162a82223c73aa63e6c9b7d91c565 (diff)
downloadcontacts-service-2fe4ba6f7e660a945ed94559110c76852c5edd47.tar.gz
contacts-service-2fe4ba6f7e660a945ed94559110c76852c5edd47.tar.bz2
contacts-service-2fe4ba6f7e660a945ed94559110c76852c5edd47.zip
Diffstat (limited to 'build-util')
-rwxr-xr-xbuild-util/API-generator.c59
-rwxr-xr-xbuild-util/generator.sh35
2 files changed, 4 insertions, 90 deletions
diff --git a/build-util/API-generator.c b/build-util/API-generator.c
deleted file mode 100755
index ee62026..0000000
--- a/build-util/API-generator.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Contacts Service
- *
- * Copyright (c) 2010 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Youngjae Shin <yj99.shin@samsung.com>
- *
- * 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.
- *
- */
-#define _GNU_SOURCE
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv)
-{
- FILE *fp;
- char *line = NULL;
- size_t len = 0;
- ssize_t read;
-
- fp = fopen(argv[1], "r");
- if (fp == NULL)
- exit(EXIT_FAILURE);
-
- while ((read = getline(&line, &len, fp)) != -1) {
- if (len >= 6 && '/'==line[0]
- && '/'==line[1]
- && '<'==line[2]
- && '!'==line[3]
- && '-'==line[4]
- && '-'==line[5])
- break;
- }
-
- while ((read = getline(&line, &len, fp)) != -1) {
- if (len >= 5 && '/'==line[0]
- && '/'==line[1]
- && '-'==line[2]
- && '-'==line[3]
- && '>'==line[4])
- break;
- printf("%s", line);
- }
-
- free(line);
- exit(EXIT_SUCCESS);
-}
-
diff --git a/build-util/generator.sh b/build-util/generator.sh
index 0bc0730..366aeba 100755
--- a/build-util/generator.sh
+++ b/build-util/generator.sh
@@ -25,37 +25,10 @@ echo "###### API Generator #####"
cd build-util
make
-#contacts-svc.h
-cat ../include/contacts-svc.head > ../include/contacts-svc.h
-./API-generator ../src/cts-service.h >> ../include/contacts-svc.h
-./API-generator ../src/cts-errors.h >> ../include/contacts-svc.h
-./API-generator ../src/cts-addressbook.h >> ../include/contacts-svc.h
-./API-generator ../src/cts-contact.h >> ../include/contacts-svc.h
-./API-generator ../src/cts-normalize.h >> ../include/contacts-svc.h
-./API-generator ../src/cts-list.h >> ../include/contacts-svc.h
-./API-generator ../src/cts-utils.h >> ../include/contacts-svc.h
-./API-generator ../src/cts-vcard.h >> ../include/contacts-svc.h
-cat ../include/contacts-svc.tail >> ../include/contacts-svc.h
-
-# contacts-svc-struct.h
-cat ../include/contacts-svc-struct.head > ../include/contacts-svc-struct.h
-./API-generator ../src/cts-struct.h >> ../include/contacts-svc-struct.h
-./API-generator ../src/cts-struct-ext.h >> ../include/contacts-svc-struct.h
-cat ../include/contacts-svc-struct.tail >> ../include/contacts-svc-struct.h
-
-# contacts-svc-sub.h
-cat ../include/contacts-svc-sub.head > ../include/contacts-svc-sub.h
-./API-generator ../src/cts-phonelog.h >> ../include/contacts-svc-sub.h
-./API-generator ../src/cts-favorite.h >> ../include/contacts-svc-sub.h
-./API-generator ../src/cts-group.h >> ../include/contacts-svc-sub.h
-./API-generator ../src/cts-im.h >> ../include/contacts-svc-sub.h
-./API-generator ../src/cts-types.h >> ../include/contacts-svc-sub.h
-cat ../include/contacts-svc-sub.tail >> ../include/contacts-svc-sub.h
-
-# Schema
-echo "static const char *schema_query = \"\\" > ../helper/schema.h
-./DB-schema-gen ../schema.sql >> ../helper/schema.h
-echo \"\; >> ../helper/schema.h
+# New server daemon Schema
+echo "static const char *schema_query = \"\\" > ../server/schema.h
+./DB-schema-gen ../schema.sql >> ../server/schema.h
+echo \"\; >> ../server/schema.h
make clean