summaryrefslogtreecommitdiff
path: root/src/lib/helpers.h
diff options
context:
space:
mode:
authorDaniel Sills <maxthest@yahoo.com>2014-08-03 17:25:24 -0700
committerDaniel Sills <maxthest@yahoo.com>2014-08-03 17:25:24 -0700
commit19ad27ad9cf9ded69dac4b3dbb678d9d4a6b9361 (patch)
treedabd47162742ab5f4efe7f8a2b666bdf0745b43c /src/lib/helpers.h
parentc741acb5c0af3805322de46f78fa81e63486a120 (diff)
downloadbluez-tools-19ad27ad9cf9ded69dac4b3dbb678d9d4a6b9361.tar.gz
Source code and contrib files updated to use the newer BlueZ 5 API. Bluez-tools now at version 0.2.0. Details regarding changes included in the ChangeLog file.
Diffstat (limited to 'src/lib/helpers.h')
-rw-r--r--src/lib/helpers.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/helpers.h b/src/lib/helpers.h
index eed1e6c..344410e 100644
--- a/src/lib/helpers.h
+++ b/src/lib/helpers.h
@@ -24,14 +24,11 @@
#ifndef __HELPERS_H
#define __HELPERS_H
-#include <stdio.h>
-
#include <glib.h>
+#include <stdio.h>
+#include <string.h>
#include "bluez-api.h"
-#ifdef OBEX_SUPPORT
-#include "obexd-api.h"
-#endif
/* DBus helpers */
gboolean intf_supported(const gchar *dbus_service_name, const gchar *dbus_object_path, const gchar *intf_name);
@@ -43,7 +40,7 @@ Device *find_device(Adapter *adapter, const gchar *name, GError **error);
/* Others helpers */
#define exit_if_error(error) G_STMT_START{ \
if (error) { \
- g_printerr("%s: %s\n", (error->domain == DBUS_GERROR && error->code == DBUS_GERROR_REMOTE_EXCEPTION && dbus_g_error_get_name(error) != NULL && strlen(dbus_g_error_get_name(error)) ? dbus_g_error_get_name(error) : "Error"), error->message); \
+ g_printerr("%s: %s\n", (error->domain == G_DBUS_ERROR && g_dbus_error_get_remote_error(error) != NULL && strlen(g_dbus_error_get_remote_error(error)) ? g_dbus_error_get_remote_error(error) : "Error"), error->message); \
exit(EXIT_FAILURE); \
}; }G_STMT_END
@@ -57,7 +54,8 @@ const gchar *name2uuid(const gchar *name);
/* FS helpers */
gboolean is_file(const gchar *filename, GError **error);
gboolean is_dir(const gchar *dirname, GError **error);
+gboolean read_access(const gchar *path, GError **error);
+gboolean write_access(const gchar *path, GError **error);
gchar *get_absolute_path(const gchar *path);
#endif /* __HELPERS_H */
-