Apply coding rule 83/64983/1
authortaesubkim <taesub.kim@samsung.com>
Wed, 6 Apr 2016 11:43:28 +0000 (20:43 +0900)
committertaesubkim <taesub.kim@samsung.com>
Wed, 6 Apr 2016 11:43:55 +0000 (20:43 +0900)
Change-Id: I258e4c933560c94780517eaf443cd427e7b8d5c8
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
daemon/include/vpnsvc.h
daemon/src/vpnsvc.c
framework/include/capi_vpn_service_private.h
framework/src/capi_vpn_service.c
include/vpn_service.h
include/vpn_service_internal.h

index 99c037f..7e92207 100755 (executable)
@@ -30,8 +30,7 @@ extern "C" {
 
 #include "generated-code.h"
 
-typedef enum _net_vpn_service_privilege_e
-{
+typedef enum _net_vpn_service_privilege_e {
        PRIVILEGE_VPN_SERVICE = 0x00,
        PRIVILEGE_VPN_SERVICE_ADMIN,
        PRIVILEGE_INTERNET,
index 852d0aa..e6a4967 100755 (executable)
@@ -482,20 +482,19 @@ gboolean vpn_service_gdbus_check_privilege(GDBusMethodInvocation *invocation, ne
                return FALSE;
        }
 
-       switch (_privilege)
-       {
+       switch (_privilege) {
        case PRIVILEGE_VPN_SERVICE:
                privilege = "http://tizen.org/privilege/vpnservice";
        break;
 
-       case PRIVILEGE_VPN_SERVICE_ADMIN :
+       case PRIVILEGE_VPN_SERVICE_ADMIN:
                privilege = "http://tizen.org/privilege/vpnservice.admin";
        break;
 
-       case PRIVILEGE_INTERNET :
+       case PRIVILEGE_INTERNET:
                privilege = "http://tizen.org/privilege/internet";
        break;
-       default :
+       default:
                LOGD("Undifined privilege");
                return FALSE;
        break;
index c949fca..613fb7f 100755 (executable)
@@ -61,7 +61,7 @@ extern "C" {
                int feature_rv = _vpnsvc_check_feature_supported(feature_name); \
                if (feature_rv != VPNSVC_ERROR_NONE) \
                        return feature_rv; \
-       } while(0)
+       } while (0)
 
 /**
   * @brief This data structure has a fido data and its length.
index cc2c328..b0c6acc 100755 (executable)
@@ -145,7 +145,7 @@ GVariant *_vpnsvc_invoke_dbus_method(GDBusConnection *connection,
 
        if (reply == NULL) {
                if (error != NULL) {
-                       if (error->code == G_DBUS_ERROR_ACCESS_DENIED){
+                       if (error->code == G_DBUS_ERROR_ACCESS_DENIED) {
                                LOGE("g_dbus_connection_call_sync() failed"
                                        "error [%d: %s]", error->code, error->message);//LCOV_EXCL_LINE
                                *dbus_error = VPNSVC_ERROR_PERMISSION_DENIED;//LCOV_EXCL_LINE
@@ -264,9 +264,8 @@ EXPORT_API int vpnsvc_init(const char* iface_name, vpnsvc_h *handle)
                                                                        g_variant_new("(su)", VPNSVC_DBUS_SERVICE_NAME, 0),
                                                                        &dbus_result);
 
-       if (dbus_result == VPNSVC_ERROR_PERMISSION_DENIED){
+       if (dbus_result == VPNSVC_ERROR_PERMISSION_DENIED)
                return VPNSVC_ERROR_PERMISSION_DENIED;
-       }
 
        if (op == NULL) {
                _vpnsvc_deinit_vpnsvc_tun_s(tmp_s); //LCOV_EXCL_LINE
@@ -366,9 +365,8 @@ EXPORT_API int vpnsvc_deinit(vpnsvc_h handle)
                                                                        g_variant_new("(s)", tun_s->name),
                                                                        &dbus_result);
 
-               if (dbus_result == VPNSVC_ERROR_PERMISSION_DENIED){
+               if (dbus_result == VPNSVC_ERROR_PERMISSION_DENIED)
                        return VPNSVC_ERROR_PERMISSION_DENIED;
-               }
 
                if (op == NULL) {
                        return VPNSVC_ERROR_IPC_FAILED; //LCOV_EXCL_LINE
@@ -425,9 +423,8 @@ EXPORT_API int vpnsvc_protect(vpnsvc_h handle, int socket_fd, const char* iface_
                                                socket_fd,
                                                &dbus_result);
 
-       if (dbus_result == VPNSVC_ERROR_PERMISSION_DENIED){
+       if (dbus_result == VPNSVC_ERROR_PERMISSION_DENIED)
                return VPNSVC_ERROR_PERMISSION_DENIED;
-       }
 
        if (op == NULL) {
                return VPNSVC_ERROR_IPC_FAILED; //LCOV_EXCL_LINE
@@ -707,9 +704,8 @@ EXPORT_API int vpnsvc_block_networks(vpnsvc_h handle,
                                                                nets_param_orig, num_allow_routes_orig),
                                                                &dbus_result);
 
-       if (dbus_result == VPNSVC_ERROR_PERMISSION_DENIED){
+       if (dbus_result == VPNSVC_ERROR_PERMISSION_DENIED)
                return VPNSVC_ERROR_PERMISSION_DENIED;
-       }
 
        if (op == NULL) {
                return VPNSVC_ERROR_IPC_FAILED; //LCOV_EXCL_LINE
@@ -757,9 +753,8 @@ EXPORT_API int vpnsvc_unblock_networks(vpnsvc_h handle)
                                                                        g_variant_new("()"),
                                                                        &dbus_result);
 
-       if (dbus_result == VPNSVC_ERROR_PERMISSION_DENIED){
+       if (dbus_result == VPNSVC_ERROR_PERMISSION_DENIED)
                return VPNSVC_ERROR_PERMISSION_DENIED;
-       }
 
        if (op == NULL) {
                return VPNSVC_ERROR_IPC_FAILED; //LCOV_EXCL_LINE
index 183eed1..feaf473 100755 (executable)
@@ -54,17 +54,16 @@ extern "C" {
   * @brief   Enumeration for VPN service error types.
   * @details Indicate formats of error type field
   */
-typedef enum
-{
-    VPNSVC_ERROR_NONE = TIZEN_ERROR_NONE,                            /**< Successful */
-    VPNSVC_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,  /**< Invalid parameter */
-    VPNSVC_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,          /**< Out of memory */
-    VPNSVC_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,  /**< Permission denied */
-    VPNSVC_ERROR_NO_SUCH_FILE = TIZEN_ERROR_NO_SUCH_FILE,            /**< No such file or directory */
-    VPNSVC_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR,                    /**< IO error */
-    VPNSVC_ERROR_TIMEOUT = TIZEN_ERROR_TIMED_OUT,                    /**< Time out error or no answer */
-    VPNSVC_ERROR_IPC_FAILED = TIZEN_ERROR_VPNSVC | 0x02,             /**< Failed to communicate with server */
-    VPNSVC_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED           /**< Not Supported */
+typedef enum {
+       VPNSVC_ERROR_NONE = TIZEN_ERROR_NONE,                           /**< Successful */
+       VPNSVC_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+       VPNSVC_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,         /**< Out of memory */
+       VPNSVC_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+       VPNSVC_ERROR_NO_SUCH_FILE = TIZEN_ERROR_NO_SUCH_FILE,           /**< No such file or directory */
+       VPNSVC_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR,                   /**< IO error */
+       VPNSVC_ERROR_TIMEOUT = TIZEN_ERROR_TIMED_OUT,                   /**< Time out error or no answer */
+       VPNSVC_ERROR_IPC_FAILED = TIZEN_ERROR_VPNSVC | 0x02,            /**< Failed to communicate with server */
+       VPNSVC_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED          /**< Not Supported */
 } vpnsvc_error_e;
 
 
@@ -326,6 +325,6 @@ int vpnsvc_get_session(vpnsvc_h handle, char** session);
 
 #ifdef __cplusplus
 }
-#endif // __cplusplus
+#endif // __cplusplus
 
 #endif /* __TIZEN_CAPI_VPN_SERVICE_H__ */
index 1fda902..bf69850 100755 (executable)
@@ -46,7 +46,7 @@ extern "C" {
  * @param[in] num_routes                       The number of routes, Unlimitation
  * @param[in] dns_servers                      The list of DNS server names - Optional
  * @param[in] num_dns_servers          The number of DNS server names - Optionl, Unlimitation
- * @param[in] dns_suffix               The DNS suffix - Optional (e.g. tizen.org)
+ * @param[in] dns_suffix               The DNS suffix - Optional (e.g. tizen.org)
  * @return 0 on success. otherwise, a negative error value.
  * @retval #VPNSVC_ERROR_NONE                  Success
  * @retval #VPNSVC_ERROR_INVALID_PARAMETER     Invalid parameter