#ifndef __LIBMAPI_PROTO_H__
#define __LIBMAPI_PROTO_H__

#undef _PRINTF_ATTRIBUTE
#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)

#ifndef __BEGIN_DECLS
#ifdef __cplusplus
#define __BEGIN_DECLS		extern "C" {
#define __END_DECLS		}
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
#endif

__BEGIN_DECLS

/* This file was automatically generated by mkproto.pl. DO NOT EDIT */

/* this file contains prototypes for functions that are part of 
 * the public API of this subsystem or library. */

#ifndef _PUBLIC_
#define _PUBLIC_
#endif

_PUBLIC_ struct nspi_context *nspi_bind(TALLOC_CTX *, 					struct dcerpc_pipe *p,
					struct cli_credentials *cred, 
					uint32_t codepage,
					uint32_t language, 
uint32_t);
_PUBLIC_ enum MAPISTATUS nspi_unbind(struct nspi_context *);
_PUBLIC_ enum MAPISTATUS nspi_UpdateStat(struct nspi_context *, 					 TALLOC_CTX *mem_ctx,
uint32_t *);
_PUBLIC_ enum MAPISTATUS nspi_QueryRows(struct nspi_context *, 					TALLOC_CTX *mem_ctx,
					struct SPropTagArray *pPropTags,
					struct SPropTagArray *MIds, 
					uint32_t count,
struct SRowSet **);
_PUBLIC_ enum MAPISTATUS nspi_SeekEntries(struct nspi_context *,					  TALLOC_CTX *mem_ctx,
					  enum TableSortOrders SortType,
					  struct SPropValue *pTarget,
					  struct SPropTagArray *pPropTags,
					  struct SPropTagArray *pMIds,
struct SRowSet **);
_PUBLIC_ enum MAPISTATUS nspi_GetMatches(struct nspi_context *, 					 TALLOC_CTX *mem_ctx,
					 struct SPropTagArray *pPropTags,
					 struct Restriction_r *Filter,
					 struct SRowSet **ppRows,
struct SPropTagArray **);
_PUBLIC_ enum MAPISTATUS nspi_ResortRestriction(struct nspi_context *,						TALLOC_CTX *mem_ctx,
						enum TableSortOrders SortType,
						struct SPropTagArray *pInMIds,
struct SPropTagArray **);
_PUBLIC_ enum MAPISTATUS nspi_DNToMId(struct nspi_context *, 				      TALLOC_CTX *mem_ctx,
				      struct StringsArray_r *pNames,
struct SPropTagArray **);
_PUBLIC_ enum MAPISTATUS nspi_GetPropList(struct nspi_context *,					  TALLOC_CTX *mem_ctx,
					  bool WantObject,
					  uint32_t dwMId,
struct SPropTagArray **);
_PUBLIC_ enum MAPISTATUS nspi_GetProps(struct nspi_context *, 				       TALLOC_CTX *mem_ctx,
				       struct SPropTagArray *pPropTags, 
				       struct SPropTagArray *MId,
struct SRowSet **);
_PUBLIC_ enum MAPISTATUS nspi_CompareMIds(struct nspi_context *,					  TALLOC_CTX *mem_ctx,
					  uint32_t MId1, uint32_t MId2,
uint32_t *);
_PUBLIC_ enum MAPISTATUS nspi_ModProps(struct nspi_context *,				       TALLOC_CTX *mem_ctx,
				       uint32_t MId,
				       struct SPropTagArray *pPropTags,
struct SRow *);
_PUBLIC_ enum MAPISTATUS nspi_GetSpecialTable(struct nspi_context *, 					      TALLOC_CTX *mem_ctx,
					      uint32_t Type,
struct SRowSet **);
_PUBLIC_ enum MAPISTATUS nspi_GetTemplateInfo(struct nspi_context *,					      TALLOC_CTX *mem_ctx,
					      uint32_t dwFlags,
					      uint32_t ulType,
					      char *pDN,
struct SRow **);
_PUBLIC_ enum MAPISTATUS nspi_ModLinkAtt(struct nspi_context *,					 bool Delete,
					 uint32_t ulPropTag,
					 uint32_t MId,
struct BinaryArray_r *);
_PUBLIC_ enum MAPISTATUS nspi_QueryColumns(struct nspi_context *,					   TALLOC_CTX *mem_ctx,
					   bool WantUnicode,
struct SPropTagArray **);
_PUBLIC_ enum MAPISTATUS nspi_GetNamesFromIDs(struct nspi_context *,					      TALLOC_CTX *mem_ctx,
					      struct FlatUID_r *lpGuid,
					      struct SPropTagArray *pPropTags,
					      struct SPropTagArray **ppReturnedPropTags,
struct PropertyNameSet_r **);
_PUBLIC_ enum MAPISTATUS nspi_GetIDsFromNames(struct nspi_context *,					      TALLOC_CTX *mem_ctx,
					      bool VerifyNames,
					      uint32_t cNames,
					      struct PropertyName_r *ppNames,
struct SPropTagArray **);
_PUBLIC_ enum MAPISTATUS nspi_ResolveNames(struct nspi_context *, 					   TALLOC_CTX *mem_ctx,
					   const char **usernames, 
					   struct SPropTagArray *pPropTags, 
					   struct SRowSet ***pppRows,
struct SPropTagArray ***);
_PUBLIC_ enum MAPISTATUS nspi_ResolveNamesW(struct nspi_context *, 					    TALLOC_CTX *mem_ctx,
					    const char **usernames, 
					    struct SPropTagArray *pPropTags, 
					    struct SRowSet ***pppRows,
struct SPropTagArray ***);
_PUBLIC_ NTSTATUS emsmdb_transaction_null(struct emsmdb_context *, struct mapi_response **);
_PUBLIC_ NTSTATUS emsmdb_transaction(struct emsmdb_context *, 				     TALLOC_CTX *mem_ctx,
				     struct mapi_request *req, 
struct mapi_response **);
_PUBLIC_ struct emsmdb_info *emsmdb_get_info(struct mapi_session *);
_PUBLIC_ void emsmdb_get_SRowSet(TALLOC_CTX *,				 struct loadparm_context *lp_ctx,
				 struct SRowSet *rowset, 
				 struct SPropTagArray *proptags, 
DATA_BLOB *);
_PUBLIC_ enum MAPISTATUS MapiLogonEx(struct mapi_session **, const char *, const char *);
_PUBLIC_ enum MAPISTATUS MapiLogonProvider(struct mapi_session **,					   const char *profname, 
					   const char *password,
enum PROVIDER_ID);
_PUBLIC_ enum MAPISTATUS MAPIInitialize(const char *);
_PUBLIC_ void MAPIUninitialize(void);
_PUBLIC_ enum MAPISTATUS SetMAPIDumpData(bool);
_PUBLIC_ enum MAPISTATUS SetMAPIDebugLevel(uint32_t);
_PUBLIC_ enum MAPISTATUS GetLoadparmContext(struct loadparm_context **);
_PUBLIC_ enum MAPISTATUS GetDefaultPublicFolder(mapi_object_t *,						uint64_t *folder,
const uint32_t);
_PUBLIC_ enum MAPISTATUS GetDefaultFolder(mapi_object_t *, 					  uint64_t *folder,
const uint32_t);
_PUBLIC_ bool IsMailboxFolder(mapi_object_t *, 			      uint64_t fid, 
uint32_t *);
_PUBLIC_ enum MAPISTATUS GetFolderItemsCount(mapi_object_t *,					     uint32_t *unread,
uint32_t *);
_PUBLIC_ enum MAPISTATUS AddUserPermission(mapi_object_t *, const char *, enum ACLRIGHTS);
_PUBLIC_ enum MAPISTATUS ModifyUserPermission(mapi_object_t *, const char *, enum ACLRIGHTS);
_PUBLIC_ enum MAPISTATUS RemoveUserPermission(mapi_object_t *, const char *);
_PUBLIC_ enum MAPISTATUS GetBestBody(mapi_object_t *, uint8_t *);
_PUBLIC_ const char *get_proptag_name(uint32_t);
_PUBLIC_ uint32_t get_proptag_value(const char *);
_PUBLIC_ void mapi_errstr(const char *, uint32_t);
_PUBLIC_ const char *mapi_get_errstr(uint32_t);
_PUBLIC_ void mapidump_SPropValue(struct SPropValue, const char *);
_PUBLIC_ void mapidump_SPropTagArray(struct SPropTagArray *);
_PUBLIC_ void mapidump_SRowSet(struct SRowSet *, const char *);
_PUBLIC_ void mapidump_SRow(struct SRow *, const char *);
_PUBLIC_ void mapidump_PAB_entry(struct SRow *);
_PUBLIC_ void mapidump_Recipients(const char **, struct SRowSet *, struct SPropTagArray *);
_PUBLIC_ void mapidump_date(struct mapi_SPropValue_array *, uint32_t, const char *);
_PUBLIC_ void mapidump_date_SPropValue(struct SPropValue, const char *, const char *);
_PUBLIC_ void mapidump_message(struct mapi_SPropValue_array *, const char *);
_PUBLIC_ void mapidump_appointment(struct mapi_SPropValue_array *, const char *);
_PUBLIC_ void mapidump_contact(struct mapi_SPropValue_array *, const char *);
_PUBLIC_ const char *get_task_status(uint32_t);
_PUBLIC_ const char *get_importance(uint32_t);
_PUBLIC_ void mapidump_task(struct mapi_SPropValue_array *, const char *);
_PUBLIC_ void mapidump_note(struct mapi_SPropValue_array *, const char *);
_PUBLIC_ void mapidump_msgflags(uint32_t, const char *);
_PUBLIC_ void mapidump_newmail(struct NewMailNotification *, const char *);
_PUBLIC_ void mapidump_tags(enum MAPITAGS *, uint16_t, const char *);
_PUBLIC_ void mapidump_foldercreated(struct FolderCreatedNotification *, const char *);
_PUBLIC_ void mapidump_folderdeleted(struct FolderDeletedNotification *, const char *);
_PUBLIC_ void mapidump_foldermoved(struct FolderMoveCopyNotification *, const char *);
_PUBLIC_ void mapidump_foldercopied(struct FolderMoveCopyNotification *, const char *);
_PUBLIC_ void mapidump_messagedeleted(struct MessageDeletedNotification *, const char *);
_PUBLIC_ void mapidump_messagecreated(struct MessageCreatedNotification *, const char *);
_PUBLIC_ void mapidump_messagemodified(struct MessageModifiedNotification *, const char *);
_PUBLIC_ void mapidump_messagemoved(struct MessageMoveCopyNotification *, const char *);
_PUBLIC_ void mapidump_messagecopied(struct MessageMoveCopyNotification *, const char *);
_PUBLIC_ const char *mapidump_freebusy_month(uint32_t, uint32_t);
_PUBLIC_ uint32_t mapidump_freebusy_year(uint32_t, uint32_t);
_PUBLIC_ void mapidump_freebusy_date(uint32_t, const char *);
_PUBLIC_ void mapidump_freebusy_event(struct Binary_r *, uint32_t, uint32_t, const char *);
_PUBLIC_ enum MAPISTATUS mapi_object_init(mapi_object_t *);
_PUBLIC_ void mapi_object_release(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS mapi_object_copy(mapi_object_t *, mapi_object_t *);
_PUBLIC_ struct mapi_session *mapi_object_get_session(mapi_object_t *);
_PUBLIC_ void mapi_object_set_session(mapi_object_t *, struct mapi_session *);
_PUBLIC_ mapi_id_t mapi_object_get_id(mapi_object_t *);
_PUBLIC_ void mapi_object_set_logon_id(mapi_object_t *, uint8_t);
_PUBLIC_ enum MAPISTATUS mapi_object_get_logon_id(mapi_object_t *, uint8_t *);
_PUBLIC_ void mapi_object_set_logon_store(mapi_object_t *);
_PUBLIC_ void mapi_object_debug(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS mapi_object_bookmark_get_count(mapi_object_t *, uint32_t *);
_PUBLIC_ enum MAPISTATUS mapi_object_bookmark_debug(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS mapi_id_array_init(mapi_id_array_t *);
_PUBLIC_ enum MAPISTATUS mapi_id_array_release(mapi_id_array_t *);
_PUBLIC_ enum MAPISTATUS mapi_id_array_get(TALLOC_CTX *,					   mapi_id_array_t *id, 
mapi_id_t **);
_PUBLIC_ enum MAPISTATUS mapi_id_array_add_obj(mapi_id_array_t *, mapi_object_t *);
_PUBLIC_ enum MAPISTATUS mapi_id_array_add_id(mapi_id_array_t *, mapi_id_t);
_PUBLIC_ enum MAPISTATUS mapi_id_array_del_id(mapi_id_array_t *, mapi_id_t);
_PUBLIC_ enum MAPISTATUS mapi_id_array_del_obj(mapi_id_array_t *, mapi_object_t *);
_PUBLIC_ struct mapi_nameid *mapi_nameid_new(TALLOC_CTX *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_OOM_add(struct mapi_nameid *,					     const char *OOM, 
const char *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_lid_add(struct mapi_nameid *,uint16_t, const char *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_string_add(struct mapi_nameid *,						const char *Name,
const char *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_custom_lid_add(struct mapi_nameid *, 						    uint16_t lid, uint16_t propType, 
const char *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_custom_string_add(struct mapi_nameid *,						       const char *Name, uint16_t propType,
const char *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_canonical_add(struct mapi_nameid *,uint32_t);
_PUBLIC_ enum MAPISTATUS mapi_nameid_OOM_lookup(const char *, const char *,uint16_t *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_lid_lookup(uint16_t, const char *,uint16_t *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_string_lookup(const char *, 						   const char *OLEGUID,
uint16_t *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_SPropTagArray(struct mapi_nameid *,struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_map_SPropTagArray(struct mapi_nameid *,							struct SPropTagArray *SPropTagArray,
struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_unmap_SPropTagArray(struct mapi_nameid *,struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_map_SPropValue(struct mapi_nameid *,						    struct SPropValue *lpProps,
						    uint32_t PropCount,
struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_unmap_SPropValue(struct mapi_nameid *,						      struct SPropValue *lpProps,
uint32_t);
_PUBLIC_ enum MAPISTATUS mapi_nameid_lookup_SPropTagArray(struct mapi_nameid *,struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS mapi_nameid_lookup_SPropValue(struct mapi_nameid *,						       struct SPropValue *lpProps,
unsigned long);
_PUBLIC_ enum MAPISTATUS mapi_nameid_GetIDsFromNames(struct mapi_nameid *,						     mapi_object_t *obj, 
struct SPropTagArray *);
_PUBLIC_ struct SPropTagArray *set_SPropTagArray(TALLOC_CTX *, uint32_t, ...);
_PUBLIC_ enum MAPISTATUS SPropTagArray_add(TALLOC_CTX *, 					   struct SPropTagArray *SPropTagArray, 
uint32_t);
_PUBLIC_ const void *get_SPropValue(struct SPropValue *, uint32_t);
_PUBLIC_ struct SPropValue *get_SPropValue_SRowSet(struct SRowSet *, uint32_t);
_PUBLIC_ const void *get_SPropValue_SRowSet_data(struct SRowSet *,uint32_t);
_PUBLIC_ enum MAPISTATUS set_default_error_SPropValue_SRow(struct SRow *, uint32_t, void *);
_PUBLIC_ struct SPropValue *get_SPropValue_SRow(struct SRow *,uint32_t);
_PUBLIC_ const void *get_SPropValue_SRow_data(struct SRow *,uint32_t);
_PUBLIC_ const void *find_SPropValue_data(struct SRow *, uint32_t);
_PUBLIC_ const void *find_mapi_SPropValue_data(struct mapi_SPropValue_array *, uint32_t);
_PUBLIC_ const void *get_mapi_SPropValue_data(struct mapi_SPropValue *);
_PUBLIC_ const void *get_SPropValue_data(struct SPropValue *);
_PUBLIC_ bool set_SPropValue_proptag(struct SPropValue *, uint32_t, const void *);
_PUBLIC_ struct SPropValue *add_SPropValue(TALLOC_CTX *, struct SPropValue *, uint32_t *, uint32_t, const void * );
_PUBLIC_ bool set_SPropValue(struct SPropValue *, const void *);
_PUBLIC_ uint32_t get_mapi_property_size(struct mapi_SPropValue *);
_PUBLIC_ uint32_t cast_mapi_SPropValue(struct mapi_SPropValue *, struct SPropValue *);
_PUBLIC_ uint32_t cast_SPropValue(struct mapi_SPropValue *, struct SPropValue *);
_PUBLIC_ enum MAPISTATUS SRow_addprop(struct SRow *, struct SPropValue);
_PUBLIC_ uint32_t SRowSet_propcpy(TALLOC_CTX *, struct SRowSet *, struct SPropValue);
_PUBLIC_ void mapi_SPropValue_array_named(mapi_object_t *, struct mapi_SPropValue_array *);
_PUBLIC_ enum MAPISTATUS get_mapi_SPropValue_array_date_timeval(struct timeval *,								struct mapi_SPropValue_array *properties,
uint32_t);
_PUBLIC_ enum MAPISTATUS get_mapi_SPropValue_date_timeval(struct timeval *, struct SPropValue);
_PUBLIC_ bool set_SPropValue_proptag_date_timeval(struct SPropValue *, uint32_t, const struct timeval *) ;
_PUBLIC_ struct RecurrencePattern *get_RecurrencePattern(TALLOC_CTX *, struct Binary_r *);
_PUBLIC_ struct AppointmentRecurrencePattern *get_AppointmentRecurrencePattern(TALLOC_CTX *, struct Binary_r *);
_PUBLIC_ struct TimeZoneStruct *get_TimeZoneStruct(TALLOC_CTX *, struct Binary_r *);
_PUBLIC_ struct GlobalObjectId *get_GlobalObjectId(TALLOC_CTX *,struct Binary_r *);
_PUBLIC_ enum MAPISTATUS ResolveNames(struct mapi_session *,				      const char **usernames, 
				      struct SPropTagArray *props, 
				      struct SRowSet **rowset, 
				      struct SPropTagArray **flaglist, 
uint32_t);
_PUBLIC_ enum MAPISTATUS GetGALTable(struct mapi_session *,				     struct SPropTagArray *SPropTagArray, 
				     struct SRowSet **SRowSet, 
				     uint32_t count, 
uint8_t);
_PUBLIC_ enum MAPISTATUS GetABRecipientInfo(struct mapi_session *,				       const char *username,
				       struct SPropTagArray *pPropTags,
struct SRowSet **);
_PUBLIC_ enum MAPISTATUS mapi_profile_add_string_attr(const char *, 						      const char *attr, 
const char *);
_PUBLIC_ enum MAPISTATUS mapi_profile_modify_string_attr(const char *, 							 const char *attr, 
const char *);
_PUBLIC_ enum MAPISTATUS mapi_profile_delete_string_attr(const char *, 							 const char *attr, 
const char *);
_PUBLIC_ const char *mapi_profile_get_ldif_path(void);
_PUBLIC_ enum MAPISTATUS CreateProfileStore(const char *, const char *);
_PUBLIC_ enum MAPISTATUS OpenProfile(struct mapi_profile *, const char *, const char *);
_PUBLIC_ enum MAPISTATUS LoadProfile(struct mapi_profile *);
_PUBLIC_ enum MAPISTATUS ShutDown(struct mapi_profile *);
_PUBLIC_ enum MAPISTATUS CreateProfile(const char *, const char *,const char *, uint32_t);
_PUBLIC_ enum MAPISTATUS DeleteProfile(const char *);
_PUBLIC_ enum MAPISTATUS ChangeProfilePassword(const char *, 					       const char *old_password,
const char *);
_PUBLIC_ enum MAPISTATUS RenameProfile(const char *, const char *);
_PUBLIC_ enum MAPISTATUS SetDefaultProfile(const char *);
_PUBLIC_ enum MAPISTATUS GetDefaultProfile(char **);
_PUBLIC_ enum MAPISTATUS GetProfileTable(struct SRowSet *);
_PUBLIC_ enum MAPISTATUS GetProfileAttr(struct mapi_profile *, 					const char *attribute, 
					unsigned int *count,
char ***);
_PUBLIC_ enum MAPISTATUS FindProfileAttr(struct mapi_profile *, const char *, const char *);
_PUBLIC_ enum MAPISTATUS ProcessNetworkProfile(struct mapi_session *, const char *,mapi_profile_callback_t, const void *);
_PUBLIC_ enum MAPISTATUS GetContentsTable(mapi_object_t *, mapi_object_t *,uint8_t, uint32_t *);
_PUBLIC_ enum MAPISTATUS GetHierarchyTable(mapi_object_t *, mapi_object_t *,uint8_t, uint32_t *);
_PUBLIC_ enum MAPISTATUS GetTable(mapi_object_t *, mapi_object_t *);
_PUBLIC_ enum MAPISTATUS GetRulesTable(mapi_object_t *, 				       mapi_object_t *obj_table,
uint8_t);
_PUBLIC_ enum MAPISTATUS ModifyTable(mapi_object_t *, struct mapi_SRowList *);
_PUBLIC_ enum MAPISTATUS SetSearchCriteria(mapi_object_t *, 					   struct mapi_SRestriction *res, 
					   uint32_t SearchFlags,
mapi_id_array_t *);
_PUBLIC_ enum MAPISTATUS GetSearchCriteria(mapi_object_t *,					   struct mapi_SRestriction *res,
					   uint32_t *SearchFlags,
					   uint16_t *FolderIdCount,
uint64_t **);
_PUBLIC_ enum MAPISTATUS CreateMessage(mapi_object_t *, mapi_object_t *);
_PUBLIC_ enum MAPISTATUS DeleteMessage(mapi_object_t *, mapi_id_t *,uint32_t);
_PUBLIC_ enum MAPISTATUS HardDeleteMessage(mapi_object_t *,					   mapi_id_t *id_messages,
uint16_t);
_PUBLIC_ enum MAPISTATUS GetMessageStatus(mapi_object_t *, 					  mapi_id_t msgid, 
uint32_t *);
_PUBLIC_ enum MAPISTATUS SetMessageStatus(mapi_object_t *,					  mapi_id_t msgid,
					  uint32_t ulNewStatus,
					  uint32_t ulNewStatusMask,
uint32_t *);
_PUBLIC_ enum MAPISTATUS MoveCopyMessages(mapi_object_t *,					  mapi_object_t *obj_dst,
					  mapi_id_array_t *message_id,
bool);
_PUBLIC_ enum MAPISTATUS CreateFolder(mapi_object_t *, 				      enum FOLDER_TYPE ulFolderType,
				      const char *name,
				      const char *comment, 
				      uint32_t ulFlags,
mapi_object_t *);
_PUBLIC_ enum MAPISTATUS EmptyFolder(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS DeleteFolder(mapi_object_t *, 				      mapi_id_t FolderId,
				      uint8_t DeleteFolderFlags,
bool *);
_PUBLIC_ enum MAPISTATUS MoveFolder(mapi_object_t *,				    mapi_object_t *obj_src, 
				    mapi_object_t *obj_dst,
				    char *NewFolderName,
bool);
_PUBLIC_ enum MAPISTATUS CopyFolder(mapi_object_t *,				    mapi_object_t *obj_src,
				    mapi_object_t *obj_dst,
				    char *NewFolderName,
				    bool UseUnicode,
bool);
_PUBLIC_ enum MAPISTATUS SetReadFlags(mapi_object_t *,				      uint8_t ReadFlags, 
				      uint16_t MessageIdCount,
uint64_t *);
_PUBLIC_ enum MAPISTATUS HardDeleteMessagesAndSubfolders(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS GetProps(mapi_object_t *, 				  struct SPropTagArray *SPropTagArray,
struct SPropValue **, uint32_t *);
_PUBLIC_ enum MAPISTATUS SetProps(mapi_object_t *, struct SPropValue *, unsigned long);
_PUBLIC_ enum MAPISTATUS SaveChangesAttachment(mapi_object_t *, 					       mapi_object_t *obj_child,
enum SaveFlags);
_PUBLIC_ enum MAPISTATUS GetPropList(mapi_object_t *, struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS GetPropsAll(mapi_object_t *,struct mapi_SPropValue_array *);
_PUBLIC_ enum MAPISTATUS DeleteProps(mapi_object_t *, struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS SetPropertiesNoReplicate(mapi_object_t *,						  struct SPropValue *lpProps, 
unsigned long);
_PUBLIC_ enum MAPISTATUS DeletePropertiesNoReplicate(mapi_object_t *,struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS GetNamesFromIDs(mapi_object_t *,					 enum MAPITAGS ulPropTag,
					 uint16_t *count,
struct MAPINAMEID **);
_PUBLIC_ enum MAPISTATUS GetIDsFromNames(mapi_object_t *,					 uint16_t count,
					 struct MAPINAMEID *nameid,
					 uint32_t ulFlags,
struct SPropTagArray **);
_PUBLIC_ enum MAPISTATUS QueryNamedProperties(mapi_object_t *,					      uint8_t queryFlags,
					      struct GUID *guid,
					      uint16_t *count,
					      uint16_t **propID,
struct MAPINAMEID **);
_PUBLIC_ enum MAPISTATUS CopyProps(mapi_object_t *,				   mapi_object_t *obj_dst,
				   struct SPropTagArray *tags,
				   uint8_t copyFlags,
				   uint16_t *problemCount,
struct PropertyProblem **);
_PUBLIC_ enum MAPISTATUS CopyTo(mapi_object_t *,				mapi_object_t *obj_dst,
				struct SPropTagArray *excludeTags,
				uint8_t copyFlags,
				uint16_t *problemCount,
struct PropertyProblem **);
_PUBLIC_ enum MAPISTATUS OpenPublicFolder(struct mapi_session *,mapi_object_t *);
_PUBLIC_ enum MAPISTATUS OpenMsgStore(struct mapi_session *,mapi_object_t *);
_PUBLIC_ enum MAPISTATUS OpenUserMailbox(struct mapi_session *,					 const char *username,
mapi_object_t *);
_PUBLIC_ enum MAPISTATUS Subscribe(mapi_object_t *, uint32_t	*, 				   uint16_t NotificationFlags,
				   bool WholeStore,
				   mapi_notify_callback_t notify_callback,
void	*);
_PUBLIC_ enum MAPISTATUS Unsubscribe(struct mapi_session *, uint32_t);
_PUBLIC_ enum MAPISTATUS DispatchNotifications(struct mapi_session *);
_PUBLIC_ enum MAPISTATUS MonitorNotification(struct mapi_session *, void *, struct mapi_notify_continue_callback_data *);
_PUBLIC_ enum MAPISTATUS SetColumns(mapi_object_t *, struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS QueryPosition(mapi_object_t *, 				       uint32_t *Numerator,
uint32_t *);
_PUBLIC_ enum MAPISTATUS QueryRows(mapi_object_t *, uint16_t,				   enum QueryRowsFlags flags, 
struct SRowSet *);
_PUBLIC_ enum MAPISTATUS QueryColumns(mapi_object_t *, struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS SeekRow(mapi_object_t *, 				 enum BOOKMARK origin, 
int32_t, uint32_t *);
_PUBLIC_ enum MAPISTATUS SeekRowBookmark(mapi_object_t *,					 uint32_t lpbkPosition,
					 uint32_t RowCount,
uint32_t *);
_PUBLIC_ enum MAPISTATUS SeekRowApprox(mapi_object_t *,				       uint32_t ulNumerator,
uint32_t);
_PUBLIC_ enum MAPISTATUS CreateBookmark(mapi_object_t *, uint32_t *);
_PUBLIC_ enum MAPISTATUS FreeBookmark(mapi_object_t *, uint32_t);
_PUBLIC_ enum MAPISTATUS SortTable(mapi_object_t *, struct SSortOrderSet *);
_PUBLIC_ enum MAPISTATUS Reset(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS Restrict(mapi_object_t *, 				  struct mapi_SRestriction *res,
uint8_t *);
_PUBLIC_ enum MAPISTATUS FindRow(mapi_object_t *, 				 struct mapi_SRestriction *res,
				 enum BOOKMARK bkOrigin,
				 enum FindRow_ulFlags ulFlags,
struct SRowSet *);
_PUBLIC_ enum MAPISTATUS GetStatus(mapi_object_t *, uint8_t *);
_PUBLIC_ enum MAPISTATUS Abort(mapi_object_t *, uint8_t *);
_PUBLIC_ enum MAPISTATUS ExpandRow(mapi_object_t *, uint64_t,				   uint16_t maxRows, struct SRowSet *rowData,
uint32_t *);
_PUBLIC_ enum MAPISTATUS CollapseRow(mapi_object_t *, uint64_t,uint32_t *);
_PUBLIC_ enum MAPISTATUS GetCollapseState(mapi_object_t *, uint64_t,					  uint32_t rowInstanceNumber,
struct SBinary_short *);
_PUBLIC_ enum MAPISTATUS SetCollapseState(mapi_object_t *,struct SBinary_short *);
_PUBLIC_ char *RfrGetNewDSA(struct mapi_session *,			    const char *server, 
const char *);
_PUBLIC_ enum MAPISTATUS RfrGetFQDNFromLegacyDN(struct mapi_session *,const char **);
_PUBLIC_ enum MAPISTATUS Logoff(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS RegisterNotification(uint16_t);
_PUBLIC_ enum MAPISTATUS CreateAttach(mapi_object_t *, mapi_object_t *);
_PUBLIC_ enum MAPISTATUS DeleteAttach(mapi_object_t *, uint32_t);
_PUBLIC_ enum MAPISTATUS GetAttachmentTable(mapi_object_t *, mapi_object_t *);
_PUBLIC_ enum MAPISTATUS GetValidAttach(mapi_object_t *, uint16_t *, uint32_t **);
_PUBLIC_ enum MAPISTATUS OpenAttach(mapi_object_t *, uint32_t,mapi_object_t *);
_PUBLIC_ enum MAPISTATUS SetRecipientType(struct SRow *, enum ulRecipClass);
_PUBLIC_ enum MAPISTATUS ModifyRecipients(mapi_object_t *, struct SRowSet *);
_PUBLIC_ enum MAPISTATUS ReadRecipients(mapi_object_t *, 					uint32_t RowId, uint8_t *RowCount,
struct ReadRecipientRow **);
_PUBLIC_ enum MAPISTATUS RemoveAllRecipients(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS SubmitMessage(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS AbortSubmit(mapi_object_t *,				     mapi_object_t *obj_folder, 
mapi_object_t *);
_PUBLIC_ enum MAPISTATUS SaveChangesMessage(mapi_object_t *,					    mapi_object_t *obj_message,
uint8_t);
_PUBLIC_ enum MAPISTATUS TransportSend(mapi_object_t *, struct mapi_SPropValue_array *);
_PUBLIC_ enum MAPISTATUS GetRecipientTable(mapi_object_t *, 					   struct SRowSet *SRowSet,
struct SPropTagArray *);
_PUBLIC_ enum MAPISTATUS SetMessageReadFlag(mapi_object_t *, 					    mapi_object_t *obj_child,
uint8_t);
_PUBLIC_ enum MAPISTATUS OpenEmbeddedMessage(mapi_object_t *,					     mapi_object_t *obj_embeddedmsg,
enum OpenEmbeddedMessage_OpenModeFlags);
_PUBLIC_ enum MAPISTATUS OpenFolder(mapi_object_t *, mapi_id_t,mapi_object_t *);
_PUBLIC_ enum MAPISTATUS PublicFolderIsGhosted(mapi_object_t *,					       mapi_object_t *obj_folder,
bool *);
_PUBLIC_ enum MAPISTATUS OpenPublicFolderByName(mapi_object_t *,						mapi_object_t *obj_child,
const char *);
_PUBLIC_ enum MAPISTATUS SetReceiveFolder(mapi_object_t *,					  mapi_object_t *obj_folder,
const char *);
_PUBLIC_ enum MAPISTATUS GetReceiveFolder(mapi_object_t *, 					  mapi_id_t *id_folder,
const char *);
_PUBLIC_ enum MAPISTATUS GetReceiveFolderTable(mapi_object_t *, struct SRowSet *);
_PUBLIC_ enum MAPISTATUS GetTransportFolder(mapi_object_t *,mapi_id_t *);
_PUBLIC_ enum MAPISTATUS GetOwningServers(mapi_object_t *,					  mapi_object_t *obj_folder,
					  uint16_t *OwningServersCount,
					  uint16_t *CheapServersCount,
char **);
_PUBLIC_ enum MAPISTATUS GetStoreState(mapi_object_t *,uint32_t *);
_PUBLIC_ enum MAPISTATUS GetOutboxFolder(mapi_object_t *, mapi_id_t *);
_PUBLIC_ enum MAPISTATUS TransportNewMail(mapi_object_t *, mapi_object_t *,const char *, uint32_t);
_PUBLIC_ enum MAPISTATUS OpenMessage(mapi_object_t *, 				     mapi_id_t id_folder, 
				     mapi_id_t id_message, 
				     mapi_object_t *obj_message,
uint8_t);
_PUBLIC_ enum MAPISTATUS ReloadCachedInformation(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS MAPIAllocateBuffer(uint32_t, void **);
_PUBLIC_ enum MAPISTATUS MAPIFreeBuffer(void *);
_PUBLIC_ enum MAPISTATUS Release(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS GetLastError(void);
_PUBLIC_ enum MAPISTATUS GetLongTermIdFromId(mapi_object_t *, mapi_id_t,struct LongTermId *);
_PUBLIC_ enum MAPISTATUS GetIdFromLongTermId(mapi_object_t *, struct LongTermId,mapi_id_t *);
_PUBLIC_ enum MAPISTATUS OpenStream(mapi_object_t *, enum MAPITAGS,				    enum OpenStream_OpenModeFlags OpenModeFlags,
mapi_object_t *);
_PUBLIC_ enum MAPISTATUS ReadStream(mapi_object_t *, unsigned char *, uint16_t, uint16_t *);
_PUBLIC_ enum MAPISTATUS WriteStream(mapi_object_t *, DATA_BLOB *, uint16_t *);
_PUBLIC_ enum MAPISTATUS CommitStream(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS GetStreamSize(mapi_object_t *, uint32_t *);
_PUBLIC_ enum MAPISTATUS SeekStream(mapi_object_t *, uint8_t, uint64_t, uint64_t *);
_PUBLIC_ enum MAPISTATUS SetStreamSize(mapi_object_t *, uint64_t);
_PUBLIC_ enum MAPISTATUS CopyToStream(mapi_object_t *, mapi_object_t *,				      uint64_t ByteCount, uint64_t *ReadByteCount,
uint64_t *);
_PUBLIC_ enum MAPISTATUS LockRegionStream(mapi_object_t *, uint64_t, uint64_t, uint32_t);
_PUBLIC_ enum MAPISTATUS UnlockRegionStream(mapi_object_t *, uint64_t, uint64_t, uint32_t);
_PUBLIC_ enum MAPISTATUS CloneStream(mapi_object_t *, mapi_object_t *);
_PUBLIC_ enum MAPISTATUS WriteAndCommitStream(mapi_object_t *, DATA_BLOB *, uint16_t *);
_PUBLIC_ enum MAPISTATUS AddressTypes(mapi_object_t *,				      uint16_t *lpcAdrType,
struct mapi_LPSTR **);
_PUBLIC_ enum MAPISTATUS SetSpooler(mapi_object_t *);
_PUBLIC_ enum MAPISTATUS SpoolerLockMessage(mapi_object_t *,					    mapi_object_t *obj_message, 
enum LockState);
_PUBLIC_ enum MAPISTATUS GetLocalReplicaIds(mapi_object_t *, 					    uint32_t IdCount,
					    struct GUID *ReplGuid,
uint8_t GlobalCount[6]);
_PUBLIC_ enum MAPISTATUS GetUserFreeBusyData(mapi_object_t *, 					     const char *recipient,
struct SRow *);
_PUBLIC_ enum MAPISTATUS IsFreeBusyConflict(mapi_object_t *,					    struct FILETIME *date,
bool *);
_PUBLIC_ int GetFreeBusyYear(const uint32_t *);
_PUBLIC_ char *x500_get_dn_element(TALLOC_CTX *, const char *, const char *);
_PUBLIC_ char *x500_truncate_dn_last_elements(TALLOC_CTX *, const char *, uint32_t);
_PUBLIC_ char *x500_get_servername(const char *);
_PUBLIC_ enum MAPISTATUS WrapCompressedRTFStream(mapi_object_t *, DATA_BLOB *);
_PUBLIC_ enum MAPISTATUS uncompress_rtf(TALLOC_CTX *, 					 uint8_t *rtfcomp, uint32_t in_size,
DATA_BLOB *);
_PUBLIC_ char *guid_delete_dash(TALLOC_CTX *, const char *);
_PUBLIC_ struct Binary_r *generate_recipient_entryid(TALLOC_CTX *, const char *);
_PUBLIC_ char *windows_to_utf8(TALLOC_CTX *, const char *);
_PUBLIC_ enum MAPISTATUS GetFIDFromEntryID(uint16_t, 					   uint8_t *lpb, 
					   uint64_t parent_fid, 
uint64_t *);
_PUBLIC_ bool lcid_get_locales(const char *);
_PUBLIC_ bool lcid_valid_locale(uint32_t);
_PUBLIC_ const char *lcid_langcode2langtag(uint32_t);
_PUBLIC_ bool lcid_print_locale(uint32_t);
_PUBLIC_ void lcid_print_languages(void);
_PUBLIC_ uint32_t lcid_lang2lcid(const char *);
_PUBLIC_ void lcid_print_group(void);
_PUBLIC_ bool lcid_print_groupmember(int);
_PUBLIC_ int lcid_lang2nb(const char *);
_PUBLIC_ bool valid_codepage(uint32_t);
_PUBLIC_ int get_interfaces(struct iface_struct *, int);

__END_DECLS

#undef _PRINTF_ATTRIBUTE
#define _PRINTF_ATTRIBUTE(a1, a2)

#endif /* __LIBMAPI_PROTO_H__ */

