#define _PLUGIN_PROPERTY_KEY_BASE "http://tizen.org/service-adaptor/plugin/property/"
+//LCOV_EXCL_START
void auth_adaptor_method_call(GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
}
service_adaptor_debug("<End> Auth External request");
}
+//LCOV_EXCL_STOP
#include "dbus-server.h"
#include "dbus-util.h"
+//LCOV_EXCL_START
char *ipc_g_variant_dup_contact_string(GVariant *string)
{
char *ret = g_variant_dup_string(string, NULL);
}
FUNC_END();
}
+//LCOV_EXCL_STOP
dbusServerThread = NULL;
}
if (dbusServerMainLoop != NULL) {
- g_main_loop_unref(dbusServerMainLoop);
- dbusServerMainLoop = NULL;
+ g_main_loop_unref(dbusServerMainLoop); //LCOV_EXCL_LINE
+ dbusServerMainLoop = NULL; //LCOV_EXCL_LINE
}
if (dbusServerMainContext != NULL) {
- g_main_context_pop_thread_default(dbusServerMainContext);
- g_main_context_unref(dbusServerMainContext);
- dbusServerMainContext = NULL;
+ g_main_context_pop_thread_default(dbusServerMainContext); //LCOV_EXCL_LINE
+ g_main_context_unref(dbusServerMainContext); //LCOV_EXCL_LINE
+ dbusServerMainContext = NULL; //LCOV_EXCL_LINE
}
}
static char __MESSAGE_ADAPTOR_ERROR_NOT_FOUND[] = "10";
static char __MESSAGE_ADAPTOR_ERROR_CONNECTION[] = "601";
+//LCOV_EXCL_START
void __get_create_chatroom_req_type(GVariant *parameters,
char **service_name,
int64_t *request_id,
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
+//LCOV_EXCL_STOP
#define RET_MSG_LEN 2048
#define __SAFE_STRDUP(x) (x) ? strdup(x) : strdup("")
+//LCOV_EXCL_START
void push_adaptor_method_call(GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
service_adaptor_debug("[End] Push dbus activation message send");
}
+//LCOV_EXCL_STOP
gpointer user_data;
} method_call_s;
+//LCOV_EXCL_START
GDBusConnection *dbus_get_connection()
{
return dbus_connection;
{
return *error == NULL;
}
+//LCOV_EXCL_STOP
/**
* D-Bus handlers vtable.
g_object_ref(dbus_connection);
}
+//LCOV_EXCL_START
/**
* @brief Callback function called when the vService Channel D-Bus name is lost or connection has been closed.
*
/* Send SIGINT to main thread to stop File Manager process and cleanly close vService Channel */
/* kill(getpid(), SIGINT); */
}
+//LCOV_EXCL_STOP
int dbus_server_init()
{
#define RET_MSG_LEN 2048
+//LCOV_EXCL_START
void service_adaptor_method_call(GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
FUNC_END();
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
+//LCOV_EXCL_STOP
#include "dbus-server.h"
#include "dbus-util.h"
+//LCOV_EXCL_START
void __destroy_shop_info_s(shop_adaptor_shop_info_s *info)
{
if (NULL == info) {
free(item);
}
}
+//LCOV_EXCL_STOP
} \
} while (0)
+//LCOV_EXCL_START
void __get_file_transfer_req_type(GVariant *parameters,
char **service_name,
char **server_path,
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
+//LCOV_EXCL_STOP
static cynara *_cynara;
/* --] Tizen 3.0 Privilege check with Cynara */
+//LCOV_EXCL_START
/**
* Free string memory
* @param data Data to be fried
return ret;
}
-
+//LCOV_EXCL_STOP
int sa_cynara_init()
{
size_t cache_size = 100;
if (CYNARA_API_SUCCESS != cynara_configuration_create(&p_conf)) {
- service_adaptor_error("cynara_configuration_create() failed");
- return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL;
+ service_adaptor_error("cynara_configuration_create() failed"); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL; //LCOV_EXCL_LINE
}
if (CYNARA_API_SUCCESS != cynara_configuration_set_cache_size(p_conf, cache_size)) {
- service_adaptor_error("cynara_configuration_set_cache_size() failed");
- cynara_configuration_destroy(p_conf);
- return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL;
+ service_adaptor_error("cynara_configuration_set_cache_size() failed"); //LCOV_EXCL_LINE
+ cynara_configuration_destroy(p_conf); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL; //LCOV_EXCL_LINE
}
ret = cynara_initialize(&_cynara, NULL);
if (CYNARA_API_SUCCESS != ret) {
- service_adaptor_error("cynara_initialize() Fail(%d)", ret);
- cynara_configuration_destroy(p_conf);
- return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL;
+ service_adaptor_error("cynara_initialize() Fail(%d)", ret); //LCOV_EXCL_LINE
+ cynara_configuration_destroy(p_conf); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL; //LCOV_EXCL_LINE
}
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
conn = g_dbus_method_invocation_get_connection(invocation);
if (NULL == conn) {
- service_adaptor_error("g_dbus_method_invocation_get_connection() return NULL");
- return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL;
+ service_adaptor_error("g_dbus_method_invocation_get_connection() return NULL"); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL; //LCOV_EXCL_LINE
}
sender = g_dbus_method_invocation_get_sender(invocation);
if (NULL == sender) {
- service_adaptor_error("g_dbus_method_invocation_get_sender() return NULL");
- return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL;
+ service_adaptor_error("g_dbus_method_invocation_get_sender() return NULL"); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL; //LCOV_EXCL_LINE
}
ret = cynara_creds_gdbus_get_client(conn, sender, CLIENT_METHOD_SMACK, &client);
if (CYNARA_API_SUCCESS != ret) {
- service_adaptor_error("cynara_creds_dbus_get_client() Fail(%d)", ret);
- return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL;
+ service_adaptor_error("cynara_creds_dbus_get_client() Fail(%d)", ret); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL; //LCOV_EXCL_LINE
}
ret = cynara_creds_gdbus_get_user(conn, sender, USER_METHOD_UID, &user);
if (CYNARA_API_SUCCESS != ret) {
- service_adaptor_error("cynara_creds_dbus_get_user() Fail(%d)", ret);
- free(client);
- return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL;
+ service_adaptor_error("cynara_creds_dbus_get_user() Fail(%d)", ret); //LCOV_EXCL_LINE
+ free(client); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL; //LCOV_EXCL_LINE
}
ret = cynara_creds_gdbus_get_pid(conn, sender, &pid);
if (CYNARA_API_SUCCESS != ret) {
- service_adaptor_error("cynara_creds_gdbus_get_pid() Fail(%d)", ret);
- free(user);
- free(client);
- return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL;
+ service_adaptor_error("cynara_creds_gdbus_get_pid() Fail(%d)", ret); //LCOV_EXCL_LINE
+ free(user); //LCOV_EXCL_LINE
+ free(client); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL; //LCOV_EXCL_LINE
}
session = cynara_session_from_pid(pid);
if (NULL == session) {
- service_adaptor_error("cynara_session_from_pid() return NULL");
- free(user);
- free(client);
- return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL;
+ service_adaptor_error("cynara_session_from_pid() return NULL"); //LCOV_EXCL_LINE
+ free(user); //LCOV_EXCL_LINE
+ free(client); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL; //LCOV_EXCL_LINE
}
service_adaptor_debug("privilege: %s, user: %s, client: %s", privilege, user, client);
ret = cynara_check(_cynara, client, session, user, privilege);
if (CYNARA_API_ACCESS_DENIED == ret) {
- service_adaptor_error("Denied (%s)", privilege);
- free(session);
- free(user);
- free(client);
- return SERVICE_ADAPTOR_INTERNAL_ERROR_NOT_AUTHORIZED;
+ service_adaptor_error("Denied (%s)", privilege); //LCOV_EXCL_LINE
+ free(session); //LCOV_EXCL_LINE
+ free(user); //LCOV_EXCL_LINE
+ free(client); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_NOT_AUTHORIZED; //LCOV_EXCL_LINE
} else if (CYNARA_API_ACCESS_ALLOWED != ret) {
- service_adaptor_error("cynara_check(%s) Fail(%d)", privilege, ret);
- free(session);
- free(user);
- free(client);
- return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL;
+ service_adaptor_error("cynara_check(%s) Fail(%d)", privilege, ret); //LCOV_EXCL_LINE
+ free(session); //LCOV_EXCL_LINE
+ free(user); //LCOV_EXCL_LINE
+ free(client); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_ADAPTOR_INTERNAL; //LCOV_EXCL_LINE
}
free(session);
/*#define AUTH_PLUGIN_PATH "/usr/lib/auth-adaptor/plugins"*/
#define MAX_RETRY 2
+//LCOV_EXCL_START
auth_adaptor_h service_adaptor_get_auth_adaptor(service_adaptor_h service_adaptor)
{
service_adaptor_debug("Get auth adaptor");
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
+//LCOV_EXCL_STOP
auth_adaptor_h service_adaptor_create_auth()
{
auth_adaptor_h auth_adaptor = auth_adaptor_create(AUTH_PLUGIN_PATH);
if ((void *) NULL == auth_adaptor) {
- service_adaptor_error("Could not create auth adaptor");
- return NULL;
+ service_adaptor_error("Could not create auth adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
service_adaptor_debug("Auth adaptor created");
auth_adaptor_listener_h service_adaptor_register_auth_listener(auth_adaptor_h auth_adaptor)
{
if ((void *) NULL == auth_adaptor) {
- service_adaptor_error("Could not create auth adaptor");
- return NULL;
+ service_adaptor_error("Could not create auth adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
auth_adaptor_listener_h auth_listener =
(auth_adaptor_listener_h) malloc(sizeof(auth_adaptor_listener_t));
if ((void *) NULL == auth_listener) {
- service_adaptor_error("Could not create auth listener");
- return NULL;
+ service_adaptor_error("Could not create auth listener"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
service_adaptor_debug("Auth adaptor listener created");
/*#define CONTACT_PLUGIN_PATH "/usr/lib/contact-adaptor/plugins"*/
+//LCOV_EXCL_START
contact_adaptor_h service_adaptor_get_contact_adaptor(service_adaptor_h service_adaptor)
{
service_adaptor_debug("Get contact adaptor");
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
+//LCOV_EXCL_STOP
contact_adaptor_h service_adaptor_create_contact()
{
contact_adaptor_h contact_adaptor = contact_adaptor_create(CONTACT_PLUGIN_PATH);
if (NULL == contact_adaptor) {
- service_adaptor_error("Could not create contact adaptor");
- return NULL;
+ service_adaptor_error("Could not create contact adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
service_adaptor_debug("Contact adaptor created");
contact_adaptor_listener_h service_adaptor_register_contact_listener(contact_adaptor_h contact_adaptor)
{
if ((void *) NULL == contact_adaptor) {
- service_adaptor_error("Could not create contact adaptor");
- return NULL;
+ service_adaptor_error("Could not create contact adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
contact_adaptor_listener_h contact_listener =
/* if calling completion callback, it need to wait called message api in dbus-message-adaptor */
-
+// LCOV_EXCL_START
void _get_service_name_by_message_context(message_adaptor_plugin_context_h context,
char **service_name)
{
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
-message_adaptor_h service_adaptor_create_message()
-{
- message_adaptor_h message_adaptor = message_adaptor_create(MESSAGE_PLUGIN_PATH);
-
- if (NULL == message_adaptor) {
- service_adaptor_error("Could not create message adaptor");
- return NULL;
- }
-
- service_adaptor_debug("Message adaptor created");
-
- return message_adaptor;
-}
-
service_adaptor_internal_error_code_e service_adaptor_message_set_connection(message_adaptor_plugin_h plugin,
message_adaptor_plugin_context_h message_context,
message_connection_policy_e policy,
return ret;
}
+//LCOV_EXCL_STOP
+
+message_adaptor_h service_adaptor_create_message()
+{
+ message_adaptor_h message_adaptor = message_adaptor_create(MESSAGE_PLUGIN_PATH);
+
+ if (NULL == message_adaptor) {
+ service_adaptor_error("Could not create message adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
+ }
+
+ service_adaptor_debug("Message adaptor created");
+
+ return message_adaptor;
+}
message_adaptor_listener_h service_adaptor_register_message_listener(message_adaptor_h message_adaptor)
{
if (NULL == message_adaptor) {
- service_adaptor_error("Could not create message adaptor");
- return NULL;
+ service_adaptor_error("Could not create message adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
message_adaptor_listener_h message_listener =
(message_adaptor_listener_h) malloc(sizeof(message_adaptor_listener_t));
if ((void *) NULL == message_listener) {
- service_adaptor_error("Could not create message listener");
- return NULL;
+ service_adaptor_error("Could not create message listener"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
message_listener->client_echo_cb = service_adaptor_message_adaptor_client_echo_cb;
#include "service-adaptor-type.h"
#include "service-adaptor-log.h"
-void blank(char *s, ...) {}
-void _blank() {}
-
#ifdef DEBUG_PLUGIN_OBSERVER_FLAG
#define _service_adaptor_debug service_adaptor_debug
#define _service_adaptor_debug_func service_adaptor_debug_func
bool storage_defined;
};
+//LCOV_EXCL_START
+
+void blank(char *s, ...) {}
+void _blank() {}
+
bool __service_adaptor_app_meta_iterator_cb(const char *_key,
const char *value,
void *user_data)
pthread_create(&runnable, NULL, _scanner_runnable, (void *)_service_adaptor);
return 0; /*TODO */
}
+//LCOV_EXCL_STOP
/***********************************************************
* Push adaptor callback
***********************************************************/
-
+//LCOV_EXCL_START
void service_adaptor_push_adaptor_on_notification_received(push_adaptor_notification_data_h notification,
void *user_data)
{
service_adaptor_info("Reconnected push plugin");
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
+//LCOV_EXCL_STOP
push_adaptor_h service_adaptor_create_push()
{
push_adaptor_h push_adaptor = push_adaptor_create(PUSH_PLUGIN_PATH);
- if ((void *) NULL == push_adaptor) {
- service_adaptor_error("Could not create push adaptor");
+ if ((void *) NULL == push_adaptor) { //LCOV_EXCL_LINE
+ service_adaptor_error("Could not create push adaptor"); //LCOV_EXCL_LINE
return NULL;
}
push_adaptor_listener_h service_adaptor_register_push_listener(push_adaptor_h push_adaptor)
{
if ((void *) NULL == push_adaptor) {
- service_adaptor_error("Could not create push adaptor");
- return NULL;
+ service_adaptor_error("Could not create push adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
push_adaptor_listener_h push_listener =
(push_adaptor_listener_h) malloc(sizeof(push_adaptor_listener_t));
if ((void *) NULL == push_listener) {
- service_adaptor_error("Could not create push listener");
- return NULL;
+ service_adaptor_error("Could not create push listener"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
push_listener->_on_notification_received = service_adaptor_push_adaptor_on_notification_received;
return push_listener;
}
+//LCOV_EXCL_START
service_adaptor_internal_error_code_e service_adaptor_push_register(const char *service_file, char **error_msg)
{
service_adaptor_debug("<Start> %s", __FUNCTION__);
}
service_adaptor_debug("<End> %s", __FUNCTION__);
}
+//LCOV_EXCL_STOP
service_adaptor_internal_error_code_e service_adaptor_ref_enabled_push_services(push_activate_h **services, int *services_len)
{
/*#define SHOP_PLUGIN_PATH "/usr/lib/shop-adaptor/plugins"*/
#define APP_TYPE "FM"
+//LCOV_EXCL_START
shop_adaptor_h service_adaptor_get_shop_adaptor(service_adaptor_h service_adaptor)
{
service_adaptor_debug("Get shop adaptor");
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
+//LCOV_EXCL_STOP
shop_adaptor_h service_adaptor_create_shop()
{
shop_adaptor_h shop_adaptor = shop_adaptor_create(SHOP_PLUGIN_PATH);
if (NULL == shop_adaptor) {
- service_adaptor_error("Could not create shop adaptor");
- return NULL;
+ service_adaptor_error("Could not create shop adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
service_adaptor_debug("Shop adaptor created");
shop_adaptor_listener_h service_adaptor_register_shop_listener(shop_adaptor_h shop_adaptor)
{
if (NULL == shop_adaptor) {
- service_adaptor_error("Could not create shop adaptor");
- return NULL;
+ service_adaptor_error("Could not create shop adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
shop_adaptor_listener_h shop_listener =
* Storage adaptor callback
***********************************************************/
/* private feature */
+
+//LCOV_EXCL_START
void service_adaptor_storage_adaptor_download_file_async_cb(void *download_request_id,
char *download_file_local_path,
storage_adaptor_error_code_h error,
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
+//LCOV_EXCL_STOP
storage_adaptor_h service_adaptor_create_storage()
{
storage_adaptor_h storage_adaptor = storage_adaptor_create(STORAGE_PLUGIN_PATH);
if (NULL == storage_adaptor) {
- service_adaptor_error("Could not create storage adaptor");
- return NULL;
+ service_adaptor_error("Could not create storage adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
service_adaptor_debug("Storage adaptor created");
storage_adaptor_listener_h service_adaptor_register_storage_listener(storage_adaptor_h storage_adaptor)
{
if (NULL == storage_adaptor) {
- service_adaptor_error("Could not create storage adaptor");
- return NULL;
+ service_adaptor_error("Could not create storage adaptor"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
storage_adaptor_listener_h storage_listener =
(storage_adaptor_listener_h) malloc(sizeof(storage_adaptor_listener_t));
if ((void *) NULL == storage_listener) {
- service_adaptor_error("Could not create storage listener");
- return NULL;
+ service_adaptor_error("Could not create storage listener"); //LCOV_EXCL_LINE
+ return NULL; //LCOV_EXCL_LINE
}
/* private feature */
return g_service_adaptor;
}
+//LCOV_EXCL_START
void debug_service_context(GList *service_list)
{
#ifdef SERVICE_ADAPTOR_DEBUG_CONTEXT
service_adaptor_error("============================================================");
service_adaptor_error("============================================================");
}
+//LCOV_EXCL_STOP
static void glog_handler_init()
{
(int)g_log_set_handler("GLib", G_LOG_LEVEL_CRITICAL, __glog_handler_cb, NULL));
}
+//LCOV_EXCL_START
service_adaptor_service_context_h service_adaptor_get_service_context(service_adaptor_h service_adaptor,
const char *service_name)
{
FUNC_END();
return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
}
-
+//LCOV_EXCL_STOP
service_adaptor_internal_error_code_e service_adaptor_start(service_adaptor_h service_adaptor)
{
service_adaptor_debug("Service Adaptor: Start");
if (NULL == service_adaptor) {
- service_adaptor_error("Invalid argument");
- return SERVICE_ADAPTOR_INTERNAL_ERROR_INVALID_ARGUMENT;
+ service_adaptor_error("Invalid argument"); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_INVALID_ARGUMENT; //LCOV_EXCL_LINE
}
int ret = auth_adaptor_start(service_adaptor->auth_handle);
if (AUTH_ADAPTOR_ERROR_NONE != ret) {
- service_adaptor_error("Could not start auth adaptor");
- service_adaptor_info("Auth-adaptor is mandatory");
+ service_adaptor_error("Could not start auth adaptor"); //LCOV_EXCL_LINE
+ service_adaptor_info("Auth-adaptor is mandatory"); //LCOV_EXCL_LINE
/* return SERVICE_ADAPTOR_INTERNAL_ERROR_LAUNCH; */
}
ret = contact_adaptor_start(service_adaptor->contact_handle);
if (CONTACT_ADAPTOR_ERROR_NONE != ret) {
- service_adaptor_warning("Could not start contact adaptor");
+ service_adaptor_warning("Could not start contact adaptor"); //LCOV_EXCL_LINE
/* return SERVICE_ADAPTOR_INTERNAL_ERROR_LAUNCH; */
}
ret = message_adaptor_start(service_adaptor->message_handle);
if (MESSAGE_ADAPTOR_ERROR_NONE != ret) {
- service_adaptor_warning("Could not start message adaptor");
+ service_adaptor_warning("Could not start message adaptor"); //LCOV_EXCL_LINE
/* return SERVICE_ADAPTOR_INTERNAL_ERROR_LAUNCH; */
}
ret = shop_adaptor_start(service_adaptor->shop_handle);
if (SHOP_ADAPTOR_ERROR_NONE != ret) {
- service_adaptor_warning("Could not start shop adaptor");
+ service_adaptor_warning("Could not start shop adaptor"); //LCOV_EXCL_LINE
/* return SERVICE_ADAPTOR_INTERNAL_ERROR_LAUNCH; */
}
ret = storage_adaptor_start(service_adaptor->storage_handle);
if (STORAGE_ADAPTOR_ERROR_NONE != ret) {
- service_adaptor_warning("Could not start storage adaptor");
+ service_adaptor_warning("Could not start storage adaptor"); //LCOV_EXCL_LINE
/* return SERVICE_ADAPTOR_INTERNAL_ERROR_LAUNCH; */
}
ret = push_adaptor_start(service_adaptor->push_handle);
if (PUSH_ADAPTOR_ERROR_NONE != ret) {
- service_adaptor_warning("Could not start push adaptor");
+ service_adaptor_warning("Could not start push adaptor"); //LCOV_EXCL_LINE
/* return SERVICE_ADAPTOR_INTERNAL_ERROR_LAUNCH; */
}
service_adaptor_debug("Service Adaptor: Stop");
if (NULL == service_adaptor) {
- service_adaptor_error("Invalid argument");
- return SERVICE_ADAPTOR_INTERNAL_ERROR_INVALID_ARGUMENT;
+ service_adaptor_error("Invalid argument"); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_INVALID_ARGUMENT; //LCOV_EXCL_LINE
}
if (0 <= service_adaptor->started) {
auth_adaptor_h auth_handle = service_adaptor_create_auth();
if (NULL == auth_handle) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create auth adaptor");
return NULL;
+ //LCOV_EXCL_STOP
}
contact_adaptor_h contact_handle = service_adaptor_create_contact();
if (NULL == contact_handle) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create contact adaptor");
auth_adaptor_destroy(auth_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
message_adaptor_h message_handle = service_adaptor_create_message();
if (NULL == message_handle) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create message adaptor");
auth_adaptor_destroy(auth_handle);
contact_adaptor_destroy(contact_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
shop_adaptor_h shop_handle = service_adaptor_create_shop();
if (NULL == shop_handle) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create shop adaptor");
auth_adaptor_destroy(auth_handle);
contact_adaptor_destroy(contact_handle);
message_adaptor_destroy(message_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
storage_adaptor_h storage_handle = service_adaptor_create_storage();
if (NULL == storage_handle) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create storage adaptor");
auth_adaptor_destroy(auth_handle);
contact_adaptor_destroy(contact_handle);
message_adaptor_destroy(message_handle);
shop_adaptor_destroy(shop_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
push_adaptor_h push_handle = service_adaptor_create_push();
if (NULL == push_handle) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create push adaptor");
auth_adaptor_destroy(auth_handle);
contact_adaptor_destroy(contact_handle);
shop_adaptor_destroy(shop_handle);
storage_adaptor_destroy(storage_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
/* register listener of adaptor */
auth_adaptor_listener_h auth_listener = service_adaptor_register_auth_listener(auth_handle);
if (NULL == auth_listener) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create auth listener");
auth_adaptor_destroy(auth_handle);
contact_adaptor_destroy(contact_handle);
storage_adaptor_destroy(storage_handle);
push_adaptor_destroy(push_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
contact_adaptor_listener_h contact_listener = service_adaptor_register_contact_listener(contact_handle);
if (NULL == contact_listener) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create contact listener");
auth_adaptor_unregister_listener(auth_handle, auth_listener);
storage_adaptor_destroy(storage_handle);
push_adaptor_destroy(push_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
message_adaptor_listener_h message_listener = service_adaptor_register_message_listener(message_handle);
if (NULL == message_listener) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create message listener");
auth_adaptor_unregister_listener(auth_handle, auth_listener);
contact_adaptor_unregister_listener(contact_handle, contact_listener);
storage_adaptor_destroy(storage_handle);
push_adaptor_destroy(push_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
shop_adaptor_listener_h shop_listener = service_adaptor_register_shop_listener(shop_handle);
if (NULL == shop_listener) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create shop listener");
auth_adaptor_unregister_listener(auth_handle, auth_listener);
contact_adaptor_unregister_listener(contact_handle, contact_listener);
storage_adaptor_destroy(storage_handle);
push_adaptor_destroy(push_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
storage_adaptor_listener_h storage_listener = service_adaptor_register_storage_listener(storage_handle);
if (NULL == storage_listener) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create storage listener");
auth_adaptor_unregister_listener(auth_handle, auth_listener);
contact_adaptor_unregister_listener(contact_handle, contact_listener);
storage_adaptor_destroy(storage_handle);
push_adaptor_destroy(push_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
push_adaptor_listener_h push_listener = service_adaptor_register_push_listener(push_handle);
if (NULL == push_listener) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create push listener");
auth_adaptor_unregister_listener(auth_handle, auth_listener);
contact_adaptor_unregister_listener(contact_handle, contact_listener);
storage_adaptor_destroy(storage_handle);
push_adaptor_destroy(push_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
/* create Service Adaptor */
service_adaptor_h service_adaptor = (service_adaptor_h) g_malloc0(sizeof(service_adaptor_s));
if (NULL == service_adaptor) {
+ //LCOV_EXCL_START
service_adaptor_error("Could not create service adaptor");
auth_adaptor_unregister_listener(auth_handle, auth_listener);
contact_adaptor_unregister_listener(contact_handle, contact_listener);
storage_adaptor_destroy(storage_handle);
push_adaptor_destroy(push_handle);
return NULL;
+ //LCOV_EXCL_STOP
}
FUNC_STEP();
service_adaptor_info("Deinit client checker");
if ((void *) NULL == service_adaptor) {
- service_adaptor_debug("Invalid argument");
+ service_adaptor_debug("Invalid argument"); //LCOV_EXCL_LINE
return;
}
/* 2) destroy service list */
if (NULL != service_adaptor->service_list) {
- g_list_free(service_adaptor->service_list);
- service_adaptor->service_list = NULL;
+ g_list_free(service_adaptor->service_list); //LCOV_EXCL_LINE
+ service_adaptor->service_list = NULL; //LCOV_EXCL_LINE
}
service_adaptor_debug("Service adaptor destroyed: service list");
service_adaptor_h service_adaptor = service_adaptor_create();
if (NULL == service_adaptor) {
- service_adaptor_error("Could not create Service Adaptor");
- return SERVICE_ADAPTOR_INTERNAL_ERROR_CREATE;
+ service_adaptor_error("Could not create Service Adaptor"); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_CREATE; //LCOV_EXCL_LINE
}
service_adaptor_debug("Service Adaptor: created");
ret = service_adaptor_start(service_adaptor);
if (SERVICE_ADAPTOR_INTERNAL_ERROR_NONE != ret) {
- service_adaptor_error("Could not load Adaptors: %d", ret);
- return SERVICE_ADAPTOR_INTERNAL_ERROR_START;
+ service_adaptor_error("Could not load Adaptors: %d", ret); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_START; //LCOV_EXCL_LINE
}
service_adaptor_debug("Service Adaptor: started");
ret = dbus_ipc_server_layer_init();
if (SERVICE_ADAPTOR_INTERNAL_ERROR_NONE != ret) {
- service_adaptor_error("Could not init D-Bus IPC server: %d", ret);
- return SERVICE_ADAPTOR_INTERNAL_ERROR_DBUS;
+ service_adaptor_error("Could not init D-Bus IPC server: %d", ret); //LCOV_EXCL_LINE
+ return SERVICE_ADAPTOR_INTERNAL_ERROR_DBUS; //LCOV_EXCL_LINE
}
service_adaptor_debug("Service Adaptor: init D-Bus");
service_adaptor_debug("Service Adaptor: Deinitialize");
if (NULL == g_service_adaptor) {
- service_adaptor_error("Invalid argument");
- return;
+ service_adaptor_error("Invalid argument"); //LCOV_EXCL_LINE
+ return; //LCOV_EXCL_LINE
}
service_adaptor_h service_adaptor = g_service_adaptor;
service_adaptor_debug("Service Adaptor: Deinitialized");
}
+//LCOV_EXCL_START
/**
* @brief main signal function
*
FUNC_END();
return ret;
}
-
+//LCOV_EXCL_STOP
/**
* @brief main function
ret = service_adaptor_init();
if (SERVICE_ADAPTOR_INTERNAL_ERROR_NONE != ret) {
- service_adaptor_error("Service Adaptor initialize error: %d\n", ret);
- return -1;
+ service_adaptor_error("Service Adaptor initialize error: %d\n", ret); //LCOV_EXCL_LINE
+ return -1; //LCOV_EXCL_LINE
}
/* installing signal handlers */
static __thread struct timeval tv;
#endif
+
+//LCOV_EXCL_START
void SERVICE_ADAPTOR_API_TIME_CHECK_START()
{
#ifdef SERVICE_ADAPTOR_DEBUG_TIME_CHECK
service_adaptor_debug_func("[TIMECHECK]================================================");
#endif
}
-
+//LCOV_EXCL_STOP
}
*/
+//LCOV_EXCL_START
static void __client_data_free(void *data)
{
if (NULL != data) {
return 0;
}
-
+//LCOV_EXCL_STOP
/*************************************************
* Public function definition
}
}
+//LCOV_EXCL_START
int client_checker_add_client(const char *service_handle_name, const char *cookie)
{
if (NULL == g_clients) {
{
return last_error_message;
}
+//LCOV_EXCL_STOP
/*************************************************
* Internal function definition
*************************************************/
-
+//LCOV_EXCL_START
static void __remove_peer_info(peer_info_t pinfo)
{
G_LOCK(locker);
#endif
}
#endif
+//LCOV_EXCL_STOP
static int __get_peers_length()
{
G_UNLOCK(locker);
}
+//LCOV_EXCL_START
int ping_manager_peer_connected(peer_info_t info)
{
service_adaptor_info("Func start <%s> [%d]", __FUNCTION__, (int)info);
service_adaptor_info("peers length : %d", ret);
return ret;
}
+//LCOV_EXCL_STOP
/*************************************************
* Public function definition
*************************************************/
-
+//LCOV_EXCL_START
int service_file_get_list(service_file_directory_e directory, char ***file_names, int *files_len)
{
service_adaptor_debug("<Start> %s", __FUNCTION__);
service_adaptor_debug("<End> %s", __FUNCTION__);
return 0;
}
-
+//LCOV_EXCL_STOP