From 8f96c52de2f9f35f361d29095190fc673db7d1c1 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 27 Sep 2019 12:52:03 +0200 Subject: Make sure to handle timeout errors in device link service and all depending services --- src/device_link_service.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/device_link_service.h') diff --git a/src/device_link_service.h b/src/device_link_service.h index a0c8390..eae912a 100644 --- a/src/device_link_service.h +++ b/src/device_link_service.h @@ -2,7 +2,7 @@ * device_link_service.h * Definitions for the DeviceLink service * - * Copyright (c) 2010 Nikias Bassen, All Rights Reserved. + * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,16 +25,16 @@ #include "property_list_service.h" /* Error Codes */ -#define DEVICE_LINK_SERVICE_E_SUCCESS 0 -#define DEVICE_LINK_SERVICE_E_INVALID_ARG -1 -#define DEVICE_LINK_SERVICE_E_PLIST_ERROR -2 -#define DEVICE_LINK_SERVICE_E_MUX_ERROR -3 -#define DEVICE_LINK_SERVICE_E_BAD_VERSION -4 - -#define DEVICE_LINK_SERVICE_E_UNKNOWN_ERROR -256 - -/** Represents an error code. */ -typedef int16_t device_link_service_error_t; +typedef enum { + DEVICE_LINK_SERVICE_E_SUCCESS = 0, + DEVICE_LINK_SERVICE_E_INVALID_ARG = -1, + DEVICE_LINK_SERVICE_E_PLIST_ERROR = -2, + DEVICE_LINK_SERVICE_E_MUX_ERROR = -3, + DEVICE_LINK_SERVICE_E_SSL_ERROR = -4, + DEVICE_LINK_SERVICE_E_RECEIVE_TIMEOUT = -5, + DEVICE_LINK_SERVICE_E_BAD_VERSION = -6, + DEVICE_LINK_SERVICE_E_UNKNOWN_ERROR = -256 +} device_link_service_error_t; struct device_link_service_client_private { property_list_service_client_t parent; -- cgit v1.1-32-gdbae