os/ossrv/ofdbus/dbus-glib/dbus/dbus-glib-error-switch.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 static gint
    19 dbus_error_to_gerror_code (const char *derr)
    20 {
    21   if (0) ; 
    22   else if (!strcmp (derr,  DBUS_ERROR_FAILED  )) 
    23     return  DBUS_GERROR_FAILED ;
    24   else if (!strcmp (derr,  DBUS_ERROR_NO_MEMORY  )) 
    25     return  DBUS_GERROR_NO_MEMORY ;
    26   else if (!strcmp (derr,  DBUS_ERROR_SERVICE_UNKNOWN  )) 
    27     return  DBUS_GERROR_SERVICE_UNKNOWN ;
    28   else if (!strcmp (derr,  DBUS_ERROR_NAME_HAS_NO_OWNER  )) 
    29     return  DBUS_GERROR_NAME_HAS_NO_OWNER ;
    30   else if (!strcmp (derr,  DBUS_ERROR_NO_REPLY  )) 
    31     return  DBUS_GERROR_NO_REPLY ;
    32   else if (!strcmp (derr,  DBUS_ERROR_IO_ERROR  )) 
    33     return  DBUS_GERROR_IO_ERROR ;
    34   else if (!strcmp (derr,  DBUS_ERROR_BAD_ADDRESS  )) 
    35     return  DBUS_GERROR_BAD_ADDRESS ;
    36   else if (!strcmp (derr,  DBUS_ERROR_NOT_SUPPORTED  )) 
    37     return  DBUS_GERROR_NOT_SUPPORTED ;
    38   else if (!strcmp (derr,  DBUS_ERROR_LIMITS_EXCEEDED  )) 
    39     return  DBUS_GERROR_LIMITS_EXCEEDED ;
    40   else if (!strcmp (derr,  DBUS_ERROR_ACCESS_DENIED  )) 
    41     return  DBUS_GERROR_ACCESS_DENIED ;
    42   else if (!strcmp (derr,  DBUS_ERROR_AUTH_FAILED  )) 
    43     return  DBUS_GERROR_AUTH_FAILED ;
    44   else if (!strcmp (derr,  DBUS_ERROR_NO_SERVER  )) 
    45     return  DBUS_GERROR_NO_SERVER ;
    46   else if (!strcmp (derr,  DBUS_ERROR_TIMEOUT  )) 
    47     return  DBUS_GERROR_TIMEOUT ;
    48   else if (!strcmp (derr,  DBUS_ERROR_NO_NETWORK  )) 
    49     return  DBUS_GERROR_NO_NETWORK ;
    50   else if (!strcmp (derr,  DBUS_ERROR_ADDRESS_IN_USE  )) 
    51     return  DBUS_GERROR_ADDRESS_IN_USE ;
    52   else if (!strcmp (derr,  DBUS_ERROR_DISCONNECTED  )) 
    53     return  DBUS_GERROR_DISCONNECTED ;
    54   else if (!strcmp (derr,  DBUS_ERROR_INVALID_ARGS  )) 
    55     return  DBUS_GERROR_INVALID_ARGS ;
    56   else if (!strcmp (derr,  DBUS_ERROR_FILE_NOT_FOUND  )) 
    57     return  DBUS_GERROR_FILE_NOT_FOUND ;
    58   else if (!strcmp (derr,  DBUS_ERROR_FILE_EXISTS  )) 
    59     return  DBUS_GERROR_FILE_EXISTS ;
    60   else if (!strcmp (derr,  DBUS_ERROR_UNKNOWN_METHOD  )) 
    61     return  DBUS_GERROR_UNKNOWN_METHOD ;
    62   else if (!strcmp (derr,  DBUS_ERROR_TIMED_OUT  )) 
    63     return  DBUS_GERROR_TIMED_OUT ;
    64   else if (!strcmp (derr,  DBUS_ERROR_MATCH_RULE_NOT_FOUND  )) 
    65     return  DBUS_GERROR_MATCH_RULE_NOT_FOUND ;
    66   else if (!strcmp (derr,  DBUS_ERROR_MATCH_RULE_INVALID  )) 
    67     return  DBUS_GERROR_MATCH_RULE_INVALID ;
    68   else if (!strcmp (derr,  DBUS_ERROR_SPAWN_EXEC_FAILED  )) 
    69     return  DBUS_GERROR_SPAWN_EXEC_FAILED ;
    70   else if (!strcmp (derr,  DBUS_ERROR_SPAWN_FORK_FAILED  )) 
    71     return  DBUS_GERROR_SPAWN_FORK_FAILED ;
    72   else if (!strcmp (derr,  DBUS_ERROR_SPAWN_CHILD_EXITED  )) 
    73     return  DBUS_GERROR_SPAWN_CHILD_EXITED ;
    74   else if (!strcmp (derr,  DBUS_ERROR_SPAWN_CHILD_SIGNALED  )) 
    75     return  DBUS_GERROR_SPAWN_CHILD_SIGNALED ;
    76   else if (!strcmp (derr,  DBUS_ERROR_SPAWN_FAILED  )) 
    77     return  DBUS_GERROR_SPAWN_FAILED ;
    78   else if (!strcmp (derr,  DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN  )) 
    79     return  DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN ;
    80   else if (!strcmp (derr,  DBUS_ERROR_INVALID_SIGNATURE  )) 
    81     return  DBUS_GERROR_INVALID_SIGNATURE ;
    82   else if (!strcmp (derr,  DBUS_ERROR_INVALID_FILE_CONTENT  )) 
    83     return  DBUS_GERROR_INVALID_FILE_CONTENT ;
    84   else if (!strcmp (derr,  DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN  )) 
    85     return  DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN ;
    86   else
    87     return DBUS_GERROR_REMOTE_EXCEPTION;
    88 }