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