edelib  2.1.0
EdbusError.h
1 /*
2  * $Id: EdbusError.h 3385 2012-08-22 21:09:54Z karijes $
3  *
4  * D-BUS stuff
5  * Copyright (c) 2008 edelib authors
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef __EDELIB_EDBUSERROR_H__
22 #define __EDELIB_EDBUSERROR_H__
23 
24 #include "edelib-global.h"
25 
26 struct DBusError;
27 
28 EDELIB_NS_BEGIN
29 
59 };
60 
61 #ifndef SKIP_DOCS
62 struct EdbusErrorImpl;
63 #endif
64 
70 class EDELIB_API EdbusError {
71 private:
72  EdbusErrorImpl* impl;
73  void dispose(void);
74 public:
79 
84 
88  EdbusError(const DBusError* err);
89 
93  EdbusError(const EdbusError& other);
94 
99 
103  EdbusError(EdbusErrorType t, const char* msg);
104 
108  EdbusErrorType type(void) const;
109 
113  const char* name(void) const;
114 
118  const char* message(void) const;
119 
123  bool valid(void) const { return type() != EDBUS_ERROR_INVALID; }
124 };
125 
126 EDELIB_NS_END
127 #endif
edelib::EDBUS_ERROR_INVALID_SIGNATURE
@ EDBUS_ERROR_INVALID_SIGNATURE
invalid signature for message
Definition: EdbusError.h:57
edelib::EDBUS_ERROR_INVALID_ARGS
@ EDBUS_ERROR_INVALID_ARGS
invalid arguments for method call
Definition: EdbusError.h:52
edelib::EDBUS_ERROR_FILE_NOT_FOUND
@ EDBUS_ERROR_FILE_NOT_FOUND
a file needed for operation not present
Definition: EdbusError.h:53
edelib::EDBUS_ERROR_NO_NETWORK
@ EDBUS_ERROR_NO_NETWORK
transport channel network not available
Definition: EdbusError.h:50
edelib::EdbusError::name
const char * name(void) const
edelib::EDBUS_ERROR_NAME_HAS_NO_OWNER
@ EDBUS_ERROR_NAME_HAS_NO_OWNER
a non-unique name used in message is not known
Definition: EdbusError.h:40
edelib::EDBUS_ERROR_TIMED_OUT
@ EDBUS_ERROR_TIMED_OUT
an operation timed out
Definition: EdbusError.h:56
edelib::EdbusErrorType
EdbusErrorType
EdbusError error type.
Definition: EdbusError.h:35
edelib::EdbusError::EdbusError
EdbusError(const EdbusError &other)
edelib::EDBUS_ERROR_NO_MEMORY
@ EDBUS_ERROR_NO_MEMORY
out of memory
Definition: EdbusError.h:38
edelib::EDBUS_ERROR_FAILED
@ EDBUS_ERROR_FAILED
generic failure
Definition: EdbusError.h:37
edelib::EDBUS_ERROR_NO_REPLY
@ EDBUS_ERROR_NO_REPLY
expected reply not received
Definition: EdbusError.h:41
edelib::EdbusError::valid
bool valid(void) const
Definition: EdbusError.h:123
edelib::EdbusError::EdbusError
EdbusError(EdbusErrorType t, const char *msg)
edelib::EdbusError::operator=
EdbusError & operator=(const EdbusError &other)
edelib::EDBUS_ERROR_FILE_EXISTS
@ EDBUS_ERROR_FILE_EXISTS
file exists, but operation does not allow overwriting
Definition: EdbusError.h:54
edelib::EDBUS_ERROR_USER_DEFINED
@ EDBUS_ERROR_USER_DEFINED
user defined error
Definition: EdbusError.h:58
edelib::EDBUS_ERROR_LIMITS_EXCEEDED
@ EDBUS_ERROR_LIMITS_EXCEEDED
resource reached it's limit
Definition: EdbusError.h:45
edelib::EDBUS_ERROR_ACCESS_DENIED
@ EDBUS_ERROR_ACCESS_DENIED
not enough permissions to execute or access operation
Definition: EdbusError.h:46
edelib::EDBUS_ERROR_NOT_SUPPORTED
@ EDBUS_ERROR_NOT_SUPPORTED
requested operation not supported
Definition: EdbusError.h:44
edelib::EdbusError
A class representing D-Bus error.
Definition: EdbusError.h:70
edelib::EdbusError::message
const char * message(void) const
edelib::EdbusError::type
EdbusErrorType type(void) const
edelib::EDBUS_ERROR_NO_SERVER
@ EDBUS_ERROR_NO_SERVER
unable to connect to the D-Bus server
Definition: EdbusError.h:48
edelib::EdbusError::EdbusError
EdbusError(const DBusError *err)
edelib::EDBUS_ERROR_UNKNOWN_METHOD
@ EDBUS_ERROR_UNKNOWN_METHOD
unknown method
Definition: EdbusError.h:55
edelib::EDBUS_ERROR_AUTH_FAILED
@ EDBUS_ERROR_AUTH_FAILED
authentication failed
Definition: EdbusError.h:47
edelib::EDBUS_ERROR_TIMEOUT
@ EDBUS_ERROR_TIMEOUT
an timeout occured during operation
Definition: EdbusError.h:49
edelib::EDBUS_ERROR_IO_ERROR
@ EDBUS_ERROR_IO_ERROR
IO error during operation.
Definition: EdbusError.h:42
edelib::EDBUS_ERROR_INVALID
@ EDBUS_ERROR_INVALID
empty error
Definition: EdbusError.h:36
edelib::EdbusError::EdbusError
EdbusError()
edelib::EDBUS_ERROR_BAD_ADDRESS
@ EDBUS_ERROR_BAD_ADDRESS
malformed address to be connected to
Definition: EdbusError.h:43
edelib::EDBUS_ERROR_DISCONNECTED
@ EDBUS_ERROR_DISCONNECTED
trying to perform operation on unconnected connection
Definition: EdbusError.h:51
edelib::EDBUS_ERROR_SERVICE_UNKNOWN
@ EDBUS_ERROR_SERVICE_UNKNOWN
address service is neither connected nor can be activated
Definition: EdbusError.h:39
edelib::EdbusError::~EdbusError
~EdbusError()