1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ofdbus/dbus-glib/dbus/dbus-glib-error-switch.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,88 @@
1.4 +/*
1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +static gint
1.22 +dbus_error_to_gerror_code (const char *derr)
1.23 +{
1.24 + if (0) ;
1.25 + else if (!strcmp (derr, DBUS_ERROR_FAILED ))
1.26 + return DBUS_GERROR_FAILED ;
1.27 + else if (!strcmp (derr, DBUS_ERROR_NO_MEMORY ))
1.28 + return DBUS_GERROR_NO_MEMORY ;
1.29 + else if (!strcmp (derr, DBUS_ERROR_SERVICE_UNKNOWN ))
1.30 + return DBUS_GERROR_SERVICE_UNKNOWN ;
1.31 + else if (!strcmp (derr, DBUS_ERROR_NAME_HAS_NO_OWNER ))
1.32 + return DBUS_GERROR_NAME_HAS_NO_OWNER ;
1.33 + else if (!strcmp (derr, DBUS_ERROR_NO_REPLY ))
1.34 + return DBUS_GERROR_NO_REPLY ;
1.35 + else if (!strcmp (derr, DBUS_ERROR_IO_ERROR ))
1.36 + return DBUS_GERROR_IO_ERROR ;
1.37 + else if (!strcmp (derr, DBUS_ERROR_BAD_ADDRESS ))
1.38 + return DBUS_GERROR_BAD_ADDRESS ;
1.39 + else if (!strcmp (derr, DBUS_ERROR_NOT_SUPPORTED ))
1.40 + return DBUS_GERROR_NOT_SUPPORTED ;
1.41 + else if (!strcmp (derr, DBUS_ERROR_LIMITS_EXCEEDED ))
1.42 + return DBUS_GERROR_LIMITS_EXCEEDED ;
1.43 + else if (!strcmp (derr, DBUS_ERROR_ACCESS_DENIED ))
1.44 + return DBUS_GERROR_ACCESS_DENIED ;
1.45 + else if (!strcmp (derr, DBUS_ERROR_AUTH_FAILED ))
1.46 + return DBUS_GERROR_AUTH_FAILED ;
1.47 + else if (!strcmp (derr, DBUS_ERROR_NO_SERVER ))
1.48 + return DBUS_GERROR_NO_SERVER ;
1.49 + else if (!strcmp (derr, DBUS_ERROR_TIMEOUT ))
1.50 + return DBUS_GERROR_TIMEOUT ;
1.51 + else if (!strcmp (derr, DBUS_ERROR_NO_NETWORK ))
1.52 + return DBUS_GERROR_NO_NETWORK ;
1.53 + else if (!strcmp (derr, DBUS_ERROR_ADDRESS_IN_USE ))
1.54 + return DBUS_GERROR_ADDRESS_IN_USE ;
1.55 + else if (!strcmp (derr, DBUS_ERROR_DISCONNECTED ))
1.56 + return DBUS_GERROR_DISCONNECTED ;
1.57 + else if (!strcmp (derr, DBUS_ERROR_INVALID_ARGS ))
1.58 + return DBUS_GERROR_INVALID_ARGS ;
1.59 + else if (!strcmp (derr, DBUS_ERROR_FILE_NOT_FOUND ))
1.60 + return DBUS_GERROR_FILE_NOT_FOUND ;
1.61 + else if (!strcmp (derr, DBUS_ERROR_FILE_EXISTS ))
1.62 + return DBUS_GERROR_FILE_EXISTS ;
1.63 + else if (!strcmp (derr, DBUS_ERROR_UNKNOWN_METHOD ))
1.64 + return DBUS_GERROR_UNKNOWN_METHOD ;
1.65 + else if (!strcmp (derr, DBUS_ERROR_TIMED_OUT ))
1.66 + return DBUS_GERROR_TIMED_OUT ;
1.67 + else if (!strcmp (derr, DBUS_ERROR_MATCH_RULE_NOT_FOUND ))
1.68 + return DBUS_GERROR_MATCH_RULE_NOT_FOUND ;
1.69 + else if (!strcmp (derr, DBUS_ERROR_MATCH_RULE_INVALID ))
1.70 + return DBUS_GERROR_MATCH_RULE_INVALID ;
1.71 + else if (!strcmp (derr, DBUS_ERROR_SPAWN_EXEC_FAILED ))
1.72 + return DBUS_GERROR_SPAWN_EXEC_FAILED ;
1.73 + else if (!strcmp (derr, DBUS_ERROR_SPAWN_FORK_FAILED ))
1.74 + return DBUS_GERROR_SPAWN_FORK_FAILED ;
1.75 + else if (!strcmp (derr, DBUS_ERROR_SPAWN_CHILD_EXITED ))
1.76 + return DBUS_GERROR_SPAWN_CHILD_EXITED ;
1.77 + else if (!strcmp (derr, DBUS_ERROR_SPAWN_CHILD_SIGNALED ))
1.78 + return DBUS_GERROR_SPAWN_CHILD_SIGNALED ;
1.79 + else if (!strcmp (derr, DBUS_ERROR_SPAWN_FAILED ))
1.80 + return DBUS_GERROR_SPAWN_FAILED ;
1.81 + else if (!strcmp (derr, DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN ))
1.82 + return DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN ;
1.83 + else if (!strcmp (derr, DBUS_ERROR_INVALID_SIGNATURE ))
1.84 + return DBUS_GERROR_INVALID_SIGNATURE ;
1.85 + else if (!strcmp (derr, DBUS_ERROR_INVALID_FILE_CONTENT ))
1.86 + return DBUS_GERROR_INVALID_FILE_CONTENT ;
1.87 + else if (!strcmp (derr, DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN ))
1.88 + return DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN ;
1.89 + else
1.90 + return DBUS_GERROR_REMOTE_EXCEPTION;
1.91 +}