mapicode.h File Reference

Macros

#define FACILITY_ITF   4
 
#define MAKE_MAPI_CODE(sev, fac, code)   (((SCODE)(sev)<<31)|((SCODE)(fac)<<16)|((SCODE)(code)))
 
#define MAKE_MAPI_E(code)   (MAKE_MAPI_CODE(SEVERITY_ERROR, FACILITY_ITF, code))
 
#define MAKE_MAPI_S(code)   (MAKE_MAPI_CODE(SEVERITY_WARN, FACILITY_ITF, code))
 
#define MAPI_RETVAL_IF(x, e, c)
 
#define MAPI_STATUS_EQUAL(x, y)   (MAPI_STATUS_V(x) == MAPI_STATUS_V(y))
 
#define MAPI_STATUS_IS_ERR_RETURN(x)
 
#define MAPI_STATUS_IS_OK_RETURN(x)
 
#define MAPI_STATUS_NOT_ERR_RETURN(x)
 
#define MAPI_STATUS_NOT_OK_RETURN(x)
 
#define MAPI_STATUS_V(x)   ((SCODE)x)
 
#define OPENCHANGE_CHECK_NOTIFICATION(s, r)
 
#define OPENCHANGE_RETVAL_CALL_IF(x, e, r, c)
 
#define OPENCHANGE_RETVAL_ERR(e, c)
 
#define OPENCHANGE_RETVAL_IF(x, e, c)
 
#define SEVERITY_ERROR   1
 
#define SEVERITY_WARN   0
 

Typedefs

typedef unsigned long SCODE
 

Macro Definition Documentation

◆ FACILITY_ITF

#define FACILITY_ITF   4

◆ MAKE_MAPI_CODE

#define MAKE_MAPI_CODE (   sev,
  fac,
  code 
)    (((SCODE)(sev)<<31)|((SCODE)(fac)<<16)|((SCODE)(code)))

◆ MAKE_MAPI_E

#define MAKE_MAPI_E (   code)    (MAKE_MAPI_CODE(SEVERITY_ERROR, FACILITY_ITF, code))

◆ MAKE_MAPI_S

#define MAKE_MAPI_S (   code)    (MAKE_MAPI_CODE(SEVERITY_WARN, FACILITY_ITF, code))

◆ MAPI_RETVAL_IF

#define MAPI_RETVAL_IF (   x,
  e,
 
)
Value:
do { \
if (x) { \
errno = (e); \
if (c) { \
talloc_free(c); \
} \
return -1; \
} \
} while (0);
Examples
fetchappointment.c, and fetchmail.c.

◆ MAPI_STATUS_EQUAL

#define MAPI_STATUS_EQUAL (   x,
 
)    (MAPI_STATUS_V(x) == MAPI_STATUS_V(y))

◆ MAPI_STATUS_IS_ERR_RETURN

#define MAPI_STATUS_IS_ERR_RETURN (   x)
Value:
do { \
if (MAPI_STATUS_IS_ERR(x)) {\
return x;\
}\
} while (0)

◆ MAPI_STATUS_IS_OK_RETURN

#define MAPI_STATUS_IS_OK_RETURN (   x)
Value:
do { \
if (MAPI_STATUS_IS_OK(x)) {\
return x;\
}\
} while (0)

◆ MAPI_STATUS_NOT_ERR_RETURN

#define MAPI_STATUS_NOT_ERR_RETURN (   x)
Value:
do { \
if (!MAPI_STATUS_IS_ERR(x)) {\
return x;\
}\
} while (0)

◆ MAPI_STATUS_NOT_OK_RETURN

#define MAPI_STATUS_NOT_OK_RETURN (   x)
Value:
do { \
if (!MAPI_STATUS_IS_OK(x)) {\
return x;\
}\
} while (0)

◆ MAPI_STATUS_V

#define MAPI_STATUS_V (   x)    ((SCODE)x)

◆ OPENCHANGE_CHECK_NOTIFICATION

#define OPENCHANGE_CHECK_NOTIFICATION (   s,
 
)
Value:
do { \
if (s->notify_ctx) \
ProcessNotification(s->notify_ctx, r); \
} while (0);

◆ OPENCHANGE_RETVAL_CALL_IF

#define OPENCHANGE_RETVAL_CALL_IF (   x,
  e,
  r,
 
)
Value:
do { \
if (x) { \
set_errno(e); \
if (r) { \
talloc_free(r); \
} \
if (c) { \
talloc_free(c); \
} \
return (e); \
} \
} while (0);

◆ OPENCHANGE_RETVAL_ERR

#define OPENCHANGE_RETVAL_ERR (   e,
 
)
Value:
do { \
set_errno(e); \
if (c) { \
talloc_free(c); \
} \
return (e); \
} while (0);

◆ OPENCHANGE_RETVAL_IF

#define OPENCHANGE_RETVAL_IF (   x,
  e,
 
)
Value:
do { \
if (x) { \
set_errno(e); \
if (c) { \
talloc_free(c); \
} \
return (e); \
} \
} while (0);

◆ SEVERITY_ERROR

#define SEVERITY_ERROR   1

◆ SEVERITY_WARN

#define SEVERITY_WARN   0

Typedef Documentation

◆ SCODE

typedef unsigned long SCODE

Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/