From: jy910.yun Date: Thu, 11 Apr 2013 02:31:21 +0000 (+0900) Subject: delete redundant test file and modify boilerplate X-Git-Tag: 2.1b_release~3 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fsystem%2Fhaptic-module-tizen.git;a=commitdiff_plain;h=d155281e051481cc982be880d2337aa565e15a27 delete redundant test file and modify boilerplate to clear opensource keyword issue Change-Id: I564c2ee32f15bab506edbee0a1ad543f5c42bc1e --- diff --git a/test/test.c b/test/test.c deleted file mode 100644 index d677cde..0000000 --- a/test/test.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * haptic-module-tizen - * - * Copyright (c) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jae-young Hwang - * - * PROPRIETARY/CONFIDENTIAL - * - * This software is the confidential and proprietary information of - * SAMSUNG ELECTRONICS ("Confidential Information"). You agree and acknowledge - * that this software is owned by Samsung and you shall not disclose - * such Confidential Information and shall use it only in accordance with the - * terms of the license agreement you entered into with SAMSUNG ELECTRONICS. - * SAMSUNG make no representations or warranties about the suitability - * of the software, either express or implied, including but not limited - * to the implied warranties of merchantability, fitness for a particular - * purpose, - * by licensee arising out of or releated to this software. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define HAPTIC_MODULE_PATH "/usr/lib/libhaptic-module.so" - -static void *dlopen_handle; -static const haptic_plugin_interface *plugin_intf; - -int main () -{ - char *error = NULL; - - printf("start!\n"); - dlopen_handle = dlopen(HAPTIC_MODULE_PATH, RTLD_NOW); - if (!dlopen_handle) { - printf("fail dlopen\n"); - printf("%s\n", dlerror()); - return -1; - } - - const haptic_plugin_interface *(*get_haptic_plugin_interface) (); - get_haptic_plugin_interface = dlsym(dlopen_handle, "get_haptic_plugin_interface"); - - if ((error = dlerror()) != NULL) { - printf("dlsym error\n"); - printf("%s\n", error); - dlclose(dlopen_handle); - return -1; - } - - plugin_intf = get_haptic_plugin_interface(); - if (!plugin_intf) { - printf("plugin_intf error\n"); - dlclose(dlopen_handle); - return -1; - } - - while (1) - { - char input = -1; - int duration = -1; - int handle = -1; - int status = -1; - - printf ("============================================\n"); - printf ("haptic_internal_vibrate_monotone : a\n"); - printf ("hatpic_internal_stop_all_effects : b\n"); - printf ("Quit : z\n"); - printf ("============================================\n"); - - status = scanf ("%c", &input); - - switch (input) - { - case 'a' : - printf ("Handle : "); - status = scanf ("%d", &handle); - if (status < 0) - return status; - - printf ("Duration : "); - status = scanf ("%d", &duration); - if (status < 0) - return status; - - plugin_intf->haptic_internal_vibrate_monotone(handle, duration, HAPTIC_MODULE_FEEDBACK_MAX, HAPTIC_MODULE_PRIORITY_HIGH, &handle); - break; - - case 'b': - printf ("Handle : "); - status = scanf ("%d", &handle); - if (status < 0) - return status; - plugin_intf->haptic_internal_stop_all_effects(handle); - break; - - case 'c': - break; - - case 'z': - return 0; - } - } - - if (dlopen_handle) { - dlclose(dlopen_handle); - } - - return 0; -} diff --git a/tizen/SIMULATOR/src/haptic.c b/tizen/SIMULATOR/src/haptic.c index eed065f..c81fe2a 100644 --- a/tizen/SIMULATOR/src/haptic.c +++ b/tizen/SIMULATOR/src/haptic.c @@ -1,23 +1,20 @@ /* * haptic-module-tizen + * Copyright (c) 2012 Samsung Electronics Co., Ltd. * - * Copyright (c) 2011 - 2012 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 * - * Contact: Jae-young Hwang + * http://www.apache.org/licenses/LICENSE-2.0 * - * PROPRIETARY/CONFIDENTIAL - * - * This software is the confidential and proprietary information of - * SAMSUNG ELECTRONICS ("Confidential Information"). You agree and acknowledge - * that this software is owned by Samsung and you shall not disclose - * such Confidential Information and shall use it only in accordance with the - * terms of the license agreement you entered into with SAMSUNG ELECTRONICS. - * SAMSUNG make no representations or warranties about the suitability - * of the software, either express or implied, including but not limited - * to the implied warranties of merchantability, fitness for a particular - * purpose, - * by licensee arising out of or releated to this software. -*/ + * 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. + */ + #include #include