sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: static gint sl@0: dbus_error_to_gerror_code (const char *derr) sl@0: { sl@0: if (0) ; sl@0: else if (!strcmp (derr, DBUS_ERROR_FAILED )) sl@0: return DBUS_GERROR_FAILED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_NO_MEMORY )) sl@0: return DBUS_GERROR_NO_MEMORY ; sl@0: else if (!strcmp (derr, DBUS_ERROR_SERVICE_UNKNOWN )) sl@0: return DBUS_GERROR_SERVICE_UNKNOWN ; sl@0: else if (!strcmp (derr, DBUS_ERROR_NAME_HAS_NO_OWNER )) sl@0: return DBUS_GERROR_NAME_HAS_NO_OWNER ; sl@0: else if (!strcmp (derr, DBUS_ERROR_NO_REPLY )) sl@0: return DBUS_GERROR_NO_REPLY ; sl@0: else if (!strcmp (derr, DBUS_ERROR_IO_ERROR )) sl@0: return DBUS_GERROR_IO_ERROR ; sl@0: else if (!strcmp (derr, DBUS_ERROR_BAD_ADDRESS )) sl@0: return DBUS_GERROR_BAD_ADDRESS ; sl@0: else if (!strcmp (derr, DBUS_ERROR_NOT_SUPPORTED )) sl@0: return DBUS_GERROR_NOT_SUPPORTED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_LIMITS_EXCEEDED )) sl@0: return DBUS_GERROR_LIMITS_EXCEEDED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_ACCESS_DENIED )) sl@0: return DBUS_GERROR_ACCESS_DENIED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_AUTH_FAILED )) sl@0: return DBUS_GERROR_AUTH_FAILED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_NO_SERVER )) sl@0: return DBUS_GERROR_NO_SERVER ; sl@0: else if (!strcmp (derr, DBUS_ERROR_TIMEOUT )) sl@0: return DBUS_GERROR_TIMEOUT ; sl@0: else if (!strcmp (derr, DBUS_ERROR_NO_NETWORK )) sl@0: return DBUS_GERROR_NO_NETWORK ; sl@0: else if (!strcmp (derr, DBUS_ERROR_ADDRESS_IN_USE )) sl@0: return DBUS_GERROR_ADDRESS_IN_USE ; sl@0: else if (!strcmp (derr, DBUS_ERROR_DISCONNECTED )) sl@0: return DBUS_GERROR_DISCONNECTED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_INVALID_ARGS )) sl@0: return DBUS_GERROR_INVALID_ARGS ; sl@0: else if (!strcmp (derr, DBUS_ERROR_FILE_NOT_FOUND )) sl@0: return DBUS_GERROR_FILE_NOT_FOUND ; sl@0: else if (!strcmp (derr, DBUS_ERROR_FILE_EXISTS )) sl@0: return DBUS_GERROR_FILE_EXISTS ; sl@0: else if (!strcmp (derr, DBUS_ERROR_UNKNOWN_METHOD )) sl@0: return DBUS_GERROR_UNKNOWN_METHOD ; sl@0: else if (!strcmp (derr, DBUS_ERROR_TIMED_OUT )) sl@0: return DBUS_GERROR_TIMED_OUT ; sl@0: else if (!strcmp (derr, DBUS_ERROR_MATCH_RULE_NOT_FOUND )) sl@0: return DBUS_GERROR_MATCH_RULE_NOT_FOUND ; sl@0: else if (!strcmp (derr, DBUS_ERROR_MATCH_RULE_INVALID )) sl@0: return DBUS_GERROR_MATCH_RULE_INVALID ; sl@0: else if (!strcmp (derr, DBUS_ERROR_SPAWN_EXEC_FAILED )) sl@0: return DBUS_GERROR_SPAWN_EXEC_FAILED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_SPAWN_FORK_FAILED )) sl@0: return DBUS_GERROR_SPAWN_FORK_FAILED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_SPAWN_CHILD_EXITED )) sl@0: return DBUS_GERROR_SPAWN_CHILD_EXITED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_SPAWN_CHILD_SIGNALED )) sl@0: return DBUS_GERROR_SPAWN_CHILD_SIGNALED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_SPAWN_FAILED )) sl@0: return DBUS_GERROR_SPAWN_FAILED ; sl@0: else if (!strcmp (derr, DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN )) sl@0: return DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN ; sl@0: else if (!strcmp (derr, DBUS_ERROR_INVALID_SIGNATURE )) sl@0: return DBUS_GERROR_INVALID_SIGNATURE ; sl@0: else if (!strcmp (derr, DBUS_ERROR_INVALID_FILE_CONTENT )) sl@0: return DBUS_GERROR_INVALID_FILE_CONTENT ; sl@0: else if (!strcmp (derr, DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN )) sl@0: return DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN ; sl@0: else sl@0: return DBUS_GERROR_REMOTE_EXCEPTION; sl@0: }