Use libfrontend
[mediadatabase.git] / result.h
blob1d23002edb4597883f006a055bec09e46155952e
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * $Id: result.h,v 1.1 2004/05/16 18:58:50 nedko Exp $
6 * DESCRIPTION:
7 * libdb return values
9 * AUTHOR:
10 * Nedko Arnaudov <nedko@users.sourceforge.net>
12 * LICENSE:
13 * GNU GENERAL PUBLIC LICENSE version 2
15 *****************************************************************************/
17 #ifndef RESULT_H__BE5C6D9E_732C_4B21_ABC5_B231B0DAF76A__INCLUDED
18 #define RESULT_H__BE5C6D9E_732C_4B21_ABC5_B231B0DAF76A__INCLUDED
20 typedef int mediadb_result;
22 #define MEDIADB_IS_ERROR(result) ((result) < 0)
23 #define MEDIADB_IS_SUCCESS(result) ((result) >= 0)
25 #define MEDIADB_ERROR(result) (-(result))
26 #define MEDIADB_SUCCESS(result) (result)
28 #define MEDIADB_OK MEDIADB_SUCCESS(0) /* Generic success */
29 #define MEDIADB_FAIL MEDIADB_ERROR(1) /* Generic fail */
30 #define MEDIADB_NOT_IMPL MEDIADB_ERROR(2) /* Not implemented */
31 #define MEDIADB_MEM MEDIADB_ERROR(3) /* Out of memory */
32 #define MEDIADB_INVAL_ARG MEDIADB_ERROR(4) /* Invalid argument to function */
33 #define MEDIADB_UNEXP MEDIADB_ERROR(5) /* Unexpected behaviour */
34 #define MEDIADB_NO_HOME MEDIADB_ERROR(0) /* HOME environment variable not set */
36 #endif /* #ifndef RESULT_H__BE5C6D9E_732C_4B21_ABC5_B231B0DAF76A__INCLUDED */
38 /*****************************************************************************
40 * Modifications log:
42 * !!! WARNING !!! Following lines are automatically updated by the CVS system.
44 * $Log: result.h,v $
45 * Revision 1.1 2004/05/16 18:58:50 nedko
46 * mediadb_result has became more general, it is not specific to libdb
48 * Revision 1.1 2004/04/27 09:12:28 nedko
49 * Initial revision.
51 *****************************************************************************/