2008-02-27 20:56:47 +03:00
|
|
|
/*
|
2013-07-23 19:31:55 +04:00
|
|
|
* cynapses libc functions
|
2008-02-27 20:56:47 +03:00
|
|
|
*
|
2013-07-23 19:31:55 +04:00
|
|
|
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
|
|
|
|
* Copyright (c) 2012-2013 by Klaas Freitag <freitag@owncloud.com>
|
2008-02-27 20:56:47 +03:00
|
|
|
*
|
2013-07-23 19:31:55 +04:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2008-02-27 20:56:47 +03:00
|
|
|
*
|
2013-07-23 19:31:55 +04:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2008-02-27 20:56:47 +03:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2013-07-23 19:31:55 +04:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2008-02-27 20:56:47 +03:00
|
|
|
*
|
2013-07-23 19:31:55 +04:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2008-02-27 20:56:47 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CSYNC_MACROS_H
|
|
|
|
#define _CSYNC_MACROS_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
/* How many elements there are in a static array */
|
|
|
|
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
|
|
|
|
|
2013-03-08 21:44:22 +04:00
|
|
|
/* Some special custom errno values to report bugs properly. The BASE value
|
|
|
|
* should always be larger than the highest system errno. */
|
2012-12-04 21:46:16 +04:00
|
|
|
#define CSYNC_CUSTOM_ERRNO_BASE 10000
|
|
|
|
|
2013-01-14 00:39:54 +04:00
|
|
|
#define ERRNO_GENERAL_ERROR CSYNC_CUSTOM_ERRNO_BASE+2
|
|
|
|
#define ERRNO_LOOKUP_ERROR CSYNC_CUSTOM_ERRNO_BASE+3
|
2012-12-04 21:46:16 +04:00
|
|
|
#define ERRNO_USER_UNKNOWN_ON_SERVER CSYNC_CUSTOM_ERRNO_BASE+4
|
2013-01-14 00:39:54 +04:00
|
|
|
#define ERRNO_PROXY_AUTH CSYNC_CUSTOM_ERRNO_BASE+5
|
|
|
|
#define ERRNO_CONNECT CSYNC_CUSTOM_ERRNO_BASE+6
|
|
|
|
#define ERRNO_TIMEOUT CSYNC_CUSTOM_ERRNO_BASE+7
|
|
|
|
#define ERRNO_PRECONDITION CSYNC_CUSTOM_ERRNO_BASE+8
|
|
|
|
#define ERRNO_RETRY CSYNC_CUSTOM_ERRNO_BASE+9
|
|
|
|
#define ERRNO_REDIRECT CSYNC_CUSTOM_ERRNO_BASE+10
|
|
|
|
#define ERRNO_WRONG_CONTENT CSYNC_CUSTOM_ERRNO_BASE+11
|
|
|
|
#define ERRNO_ERROR_STRING CSYNC_CUSTOM_ERRNO_BASE+13
|
|
|
|
#define ERRNO_SERVICE_UNAVAILABLE CSYNC_CUSTOM_ERRNO_BASE+14
|
2013-05-16 19:37:30 +04:00
|
|
|
#define ERRNO_USER_ABORT CSYNC_CUSTOM_ERRNO_BASE+16
|
2015-02-25 10:57:39 +03:00
|
|
|
#define ERRNO_STORAGE_UNAVAILABLE CSYNC_CUSTOM_ERRNO_BASE+17
|
2012-12-04 21:46:16 +04:00
|
|
|
|
2008-02-27 20:56:47 +03:00
|
|
|
#endif /* _CSYNC_MACROS_H */
|
2009-05-13 12:12:07 +04:00
|
|
|
/* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */
|