/usr/include/mapistore/mapistore_errors.h is in libmapistore-dev 1:2.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | /*
OpenChange Storage Abstraction Layer library
OpenChange Project
Copyright (C) Julien Kerihuel 2009
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
\file mapistore_errors.h
This header provides a set of result codes for MAPISTORE function calls.
*/
#ifndef __MAPISTORE_ERRORS_H
#define __MAPISTORE_ERRORS_H
void mapistore_set_errno(int);
#define MAPISTORE_RETVAL_IF(x,e,c) \
do { \
if (x) { \
mapistore_set_errno(e); \
if (c) { \
talloc_free(c); \
} \
return (e); \
} \
} while (0);
#define MAPISTORE_SANITY_CHECKS(x,c) \
MAPISTORE_RETVAL_IF(!x, MAPISTORE_ERR_NOT_INITIALIZED, c); \
MAPISTORE_RETVAL_IF(!x->processing_ctx, MAPISTORE_ERR_NOT_INITIALIZED, c); \
MAPISTORE_RETVAL_IF(!x->context_list, MAPISTORE_ERR_NOT_INITIALIZED, c);
enum mapistore_error {
/**
The function call succeeded.
*/
MAPISTORE_SUCCESS = 0,
/**
The function call failed for some non-specific reason.
*/
MAPISTORE_ERROR = 1,
/**
The function call failed because it was unable to allocate the
memory required by underlying operations.
*/
MAPISTORE_ERR_NO_MEMORY = 2,
/**
The function call failed because underlying context has already
been initialized
*/
MAPISTORE_ERR_ALREADY_INITIALIZED = 3,
/**
The function call failed because context has not been initialized.
*/
MAPISTORE_ERR_NOT_INITIALIZED = 4,
/**
The function call failed because an internal mapistore storage
component has corrupted data.
*/
MAPISTORE_ERR_CORRUPTED = 5,
/**
The function call failed because one of the function parameters is
invalid
*/
MAPISTORE_ERR_INVALID_PARAMETER = 6,
/**
The function call failed because the directory doesn't exist
*/
MAPISTORE_ERR_NO_DIRECTORY = 7,
/**
The function call failed because the underlying function couldn't
open a database.
*/
MAPISTORE_ERR_DATABASE_INIT = 8,
/**
The function call failed because the underlying function didn't run
a database operation successfully.
*/
MAPISTORE_ERR_DATABASE_OPS = 9,
/**
The function failed to register a storage backend
*/
MAPISTORE_ERR_BACKEND_REGISTER = 10,
/**
One of more storage backend initialization functions failed to
complete successfully.
*/
MAPISTORE_ERR_BACKEND_INIT = 11,
/**
The function failed because mapistore failed to create a context
*/
MAPISTORE_ERR_CONTEXT_FAILED = 12,
/**
The function failed because the provided namespace is invalid
*/
MAPISTORE_ERR_INVALID_NAMESPACE = 13,
/**
The function failed to find requested record/data
*/
MAPISTORE_ERR_NOT_FOUND = 14,
/**
The function still has a reference count
*/
MAPISTORE_ERR_REF_COUNT = 15,
/**
The function already have record/data for the searched element
*/
MAPISTORE_ERR_EXIST = 16,
/**
The function failed to generate requested data/payload
*/
MAPISTORE_ERR_INVALID_DATA = 17,
/**
The function failed to send message
*/
MAPISTORE_ERR_MSG_SEND = 18,
/**
The function failed to receive message
*/
MAPISTORE_ERR_MSG_RCV = 19,
/**
The operation required privileges that the user does not have
*/
MAPISTORE_ERR_DENIED = 20,
/**
The function is not implemented
*/
MAPISTORE_ERR_NOT_IMPLEMENTED
};
#endif /* ! __MAPISTORE_ERRORS_H */
|