struct Binary_r *set_RecurrencePattern(TALLOC_CTX *, const struct RecurrencePattern *);
struct Binary_r *set_AppointmentRecurrencePattern(TALLOC_CTX *mem_ctx, const struct AppointmentRecurrencePattern *);
struct TimeZoneStruct *get_TimeZoneStruct(TALLOC_CTX *, struct Binary_r *);
+struct PtypServerId *get_PtypServerId(TALLOC_CTX *, struct Binary_r *);
struct GlobalObjectId *get_GlobalObjectId(TALLOC_CTX *, struct Binary_r *);
struct MessageEntryId *get_MessageEntryId(TALLOC_CTX *, struct Binary_r *);
+struct FolderEntryId *get_FolderEntryId(TALLOC_CTX *, struct Binary_r *);
struct AddressBookEntryId *get_AddressBookEntryId(TALLOC_CTX *, struct Binary_r *);
const char *get_TypedString(struct TypedString *);
bool set_mapi_SPropValue(TALLOC_CTX *, struct mapi_SPropValue *, const void *);
case PT_CLSID:
return (const void *)lpProps->value.lpguid;
case PT_BINARY:
+ case PT_SVREID:
return (const void *)&lpProps->value.bin;
case PT_OBJECT:
return (const void *)&lpProps->value.object;
_PUBLIC_ bool set_mapi_SPropValue(TALLOC_CTX *mem_ctx, struct mapi_SPropValue *lpProps, const void *data)
{
if (data == NULL) {
+ lpProps->ulPropTag = (lpProps->ulPropTag & 0xffff0000) | PT_ERROR;
lpProps->value.err = MAPI_E_NOT_FOUND;
return false;
}
lpProps->value.MVszW = *((const struct mapi_SLPSTRArrayW *)data);
break;
default:
+ lpProps->ulPropTag = (lpProps->ulPropTag & 0xffff0000) | PT_ERROR;
lpProps->value.err = MAPI_E_NOT_FOUND;
return false;
_PUBLIC_ bool set_SPropValue(struct SPropValue *lpProps, const void *data)
{
if (data == NULL) {
+ lpProps->ulPropTag = (lpProps->ulPropTag & 0xffff0000) | PT_ERROR;
lpProps->value.err = MAPI_E_NOT_FOUND;
return false;
}
lpProps->value.lpszA = (const char *) data;
break;
case PT_BINARY:
+ case PT_SVREID:
lpProps->value.bin = *((const struct Binary_r *)data);
break;
case PT_UNICODE:
lpProps->value.object = *((const uint32_t *)data);
break;
default:
+ lpProps->ulPropTag = (lpProps->ulPropTag & 0xffff0000) | PT_ERROR;
lpProps->value.err = MAPI_E_NOT_FOUND;
return false;
/* return size; */
/* } */
+#warning the get_XXX NDR wrapper should be normalized
/**
\details Retrieve a TimeZoneStruct structure from a binary blob
}
+/**
+ \details Retrieve a PtypServerId structure from a binary blob
+
+ \param mem_ctx pointer to the memory context
+ \param bin pointer to the Binary_r structure with raw PtypServerId data
+
+ \return Allocated PtypServerId structure on success, otherwise
+ NULL
+
+ \note Developers must free the allocated PtypServerId when
+ finished.
+ */
+_PUBLIC_ struct PtypServerId *get_PtypServerId(TALLOC_CTX *mem_ctx, struct Binary_r *bin)
+{
+ struct PtypServerId *PtypServerId = NULL;
+ struct ndr_pull *ndr;
+ enum ndr_err_code ndr_err_code;
+
+ /* Sanity checks */
+ if (!bin) return NULL;
+ if (!bin->cb) return NULL;
+ if (!bin->lpb) return NULL;
+
+ ndr = talloc_zero(mem_ctx, struct ndr_pull);
+ ndr->offset = 0;
+ ndr->data = bin->lpb;
+ ndr->data_size = bin->cb;
+
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+ PtypServerId = talloc_zero(mem_ctx, struct PtypServerId);
+ ndr_err_code = ndr_pull_PtypServerId(ndr, NDR_SCALARS, PtypServerId);
+
+ talloc_free(ndr);
+
+ if (ndr_err_code != NDR_ERR_SUCCESS) {
+ talloc_free(PtypServerId);
+ return NULL;
+ }
+
+ return PtypServerId;
+}
+
/**
\details Retrieve a GlobalObjectId structure from a binary blob
return MessageEntryId;
}
+/**
+ \details Retrieve a FolderEntryId structure from a binary blob
+
+ \param mem_ctx pointer to the memory context
+ \param bin pointer to the Binary_r structure with raw FolderEntryId data
+
+ \return Allocated FolderEntryId structure on success, otherwise
+ NULL
+
+ \note Developers must free the allocated FolderEntryId when
+ finished.
+ */
+_PUBLIC_ struct FolderEntryId *get_FolderEntryId(TALLOC_CTX *mem_ctx, struct Binary_r *bin)
+{
+ struct FolderEntryId *FolderEntryId = NULL;
+ struct ndr_pull *ndr;
+ enum ndr_err_code ndr_err_code;
+
+ /* Sanity checks */
+ if (!bin) return NULL;
+ if (!bin->cb) return NULL;
+ if (!bin->lpb) return NULL;
+
+ ndr = talloc_zero(mem_ctx, struct ndr_pull);
+ ndr->offset = 0;
+ ndr->data = bin->lpb;
+ ndr->data_size = bin->cb;
+
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+ FolderEntryId = talloc_zero(mem_ctx, struct FolderEntryId);
+ ndr_err_code = ndr_pull_FolderEntryId(ndr, NDR_SCALARS, FolderEntryId);
+
+ talloc_free(ndr);
+
+ if (ndr_err_code != NDR_ERR_SUCCESS) {
+ talloc_free(FolderEntryId);
+ return NULL;
+ }
+
+ return FolderEntryId;
+}
+
/**
\details Retrieve a AddressBookEntryId structure from a binary blob
{ PidTagAddressBookHierarchicalRootDepartment_Error, PT_ERROR, "PidTagAddressBookHierarchicalRootDepartment_Error" },
{ PidTagAddressBookHierarchicalShowInDepartments, PT_OBJECT, "PidTagAddressBookHierarchicalShowInDepartments" },
{ PidTagAddressBookHierarchicalShowInDepartments_Error, PT_ERROR, "PidTagAddressBookHierarchicalShowInDepartments_Error" },
- { PidTagAddressBookHomeMessageDatabase, PT_STRING8, "PidTagAddressBookHomeMessageDatabase" },
+ { PidTagAddressBookHomeMessageDatabase, PT_UNICODE, "PidTagAddressBookHomeMessageDatabase" },
{ PidTagAddressBookHomeMessageDatabase_Error, PT_ERROR, "PidTagAddressBookHomeMessageDatabase_Error" },
{ PidTagAddressBookIsMaster, PT_BOOLEAN, "PidTagAddressBookIsMaster" },
{ PidTagAddressBookIsMaster_Error, PT_ERROR, "PidTagAddressBookIsMaster_Error" },
#define PidTagAccessLevel PROP_TAG(PT_LONG , 0x0FF7) /* 0x0FF70003 */
#define PidTagAccessLevel_Error PROP_TAG(PT_ERROR , 0x0FF7) /* 0x0FF7000A */
#define PidTagAccess_Error PROP_TAG(PT_ERROR , 0x0FF4) /* 0x0FF4000A */
+#define PidTagAccessControlListData PROP_TAG(PT_BINARY , 0x3FE0)
#define PidTagAccount PROP_TAG(PT_UNICODE , 0x3A00) /* 0x3A00001F */
#define PidTagAccount_Error PROP_TAG(PT_ERROR , 0x3A00) /* 0x3A00000A */
#define PidTagAdditionalRenEntryIds PROP_TAG(PT_MV_BINARY , 0x36D8) /* 0x36D81102 */
#define PidTagAddressBookHierarchicalRootDepartment_Error PROP_TAG(PT_ERROR , 0x8C98) /* 0x8C98000A */
#define PidTagAddressBookHierarchicalShowInDepartments PROP_TAG(PT_OBJECT , 0x8C94) /* 0x8C94000D */
#define PidTagAddressBookHierarchicalShowInDepartments_Error PROP_TAG(PT_ERROR , 0x8C94) /* 0x8C94000A */
-#define PidTagAddressBookHomeMessageDatabase PROP_TAG(PT_STRING8 , 0x8006) /* 0x8006001E */
+#define PidTagAddressBookHomeMessageDatabase PROP_TAG(PT_UNICODE , 0x8006) /* 0x8006001E */
#define PidTagAddressBookHomeMessageDatabase_Error PROP_TAG(PT_ERROR , 0x8006) /* 0x8006000A */
#define PidTagAddressBookIsMaster PROP_TAG(PT_BOOLEAN , 0xFFFB) /* 0xFFFB000B */
#define PidTagAddressBookIsMaster_Error PROP_TAG(PT_ERROR , 0xFFFB) /* 0xFFFB000A */
#define PidTagAddressBookModerationEnabled PROP_TAG(PT_BOOLEAN , 0x8CB5) /* 0x8CB5000B */
#define PidTagAddressBookModerationEnabled_Error PROP_TAG(PT_ERROR , 0x8CB5) /* 0x8CB5000A */
#define PidTagAddressBookNetworkAddress PROP_TAG(PT_MV_UNICODE, 0x8170) /* 0x8170101F */
+#define PidTagAddressBookNetworkAddress_string8 PROP_TAG(PT_MV_STRING8, 0x8170) /* 0x8170101E */
#define PidTagAddressBookNetworkAddress_Error PROP_TAG(PT_ERROR , 0x8170) /* 0x8170000A */
#define PidTagAddressBookObjectDistinguishedName PROP_TAG(PT_UNICODE , 0x803C) /* 0x803C001F */
#define PidTagAddressBookObjectDistinguishedName_Error PROP_TAG(PT_ERROR , 0x803C) /* 0x803C000A */
#define PidTagAddressBookPhoneticSurname PROP_TAG(PT_UNICODE , 0x8C8F) /* 0x8C8F001F */
#define PidTagAddressBookPhoneticSurname_Error PROP_TAG(PT_ERROR , 0x8C8F) /* 0x8C8F000A */
#define PidTagAddressBookProxyAddresses PROP_TAG(PT_MV_UNICODE, 0x800F) /* 0x800F101F */
+#define PidTagAddressBookProxyAddresses_string8 PROP_TAG(PT_MV_STRING8, 0x800F) /* 0x800F101E */
#define PidTagAddressBookProxyAddresses_Error PROP_TAG(PT_ERROR , 0x800F) /* 0x800F000A */
#define PidTagAddressBookPublicDelegates PROP_TAG(PT_OBJECT , 0x8015) /* 0x8015000D */
#define PidTagAddressBookPublicDelegates_Error PROP_TAG(PT_ERROR , 0x8015) /* 0x8015000A */
int i;
DEBUG(0, ("namespace is %s and backend_uri is '%s'\n", namespace, uri));
+
+ context = talloc_zero(NULL, struct backend_context);
+
for (i = 0; i < num_backends; i++) {
if (backends[i].backend->backend.namespace &&
!strcmp(namespace, backends[i].backend->backend.namespace)) {
found = true;
- retval = backends[i].backend->backend.create_context(NULL, conn_info, tdbwrap, uri, &backend_object);
+ retval = backends[i].backend->backend.create_context(context, conn_info, tdbwrap, uri, &backend_object);
if (retval != MAPISTORE_SUCCESS) {
- return retval;
+ goto end;
}
break;
}
}
+
if (found == false) {
DEBUG(0, ("MAPISTORE: no backend with namespace '%s' is available\n", namespace));
- return MAPISTORE_ERR_NOT_FOUND;
+ retval = MAPISTORE_ERR_NOT_FOUND;
+ goto end;
}
- context = talloc_zero(mem_ctx, struct backend_context);
- context->backend = backends[i].backend;
context->backend_object = backend_object;
- talloc_reference(context, backend_object);
- context->backend->context.get_root_folder(backend_object, context, fid, &context->root_folder_object);
- talloc_unlink(NULL, backend_object);
+ context->backend = backends[i].backend;
+ retval = context->backend->context.get_root_folder(backend_object, context, fid, &context->root_folder_object);
+ if (retval != MAPISTORE_SUCCESS) {
+ goto end;
+ }
+
context->ref_count = 1;
context->uri = talloc_asprintf(context, "%s%s", namespace, uri);
*context_p = context;
- return MAPISTORE_SUCCESS;
+ (void) talloc_reference(mem_ctx, context);
+
+end:
+ talloc_unlink(NULL, context);
+
+ return retval;
}
DEBUG(4, ("[%s:%d] mapistore folder context retval = %d\n", __FUNCTION__, __LINE__, ret));
break;
case EMSMDBP_OBJECT_TABLE:
- if (emsmdbp_is_mapistore(object) && object->object.table->handle > 0) {
+ if (emsmdbp_is_mapistore(object) && object->backend_object && object->object.table->handle > 0) {
mapistore_table_handle_destructor(object->emsmdbp_ctx->mstore_ctx, emsmdbp_get_contextID(object), object->backend_object, object->object.table->handle);
}
if (object->object.table->subscription_list) {
return ret;
}
-
+
_PUBLIC_ struct emsmdbp_object *emsmdbp_folder_open_table(TALLOC_CTX *mem_ctx,
struct emsmdbp_object *parent_object,
uint32_t table_type, uint32_t handle_id)
uint32_t contextID;
uint32_t *obj_count;
uint8_t *has_subobj;
- time_t unix_time;
- NTTIME nt_time;
- struct FILETIME *ft;
+ /* time_t unix_time; */
+ /* NTTIME nt_time; */
+ /* struct FILETIME *ft; */
contextID = emsmdbp_get_contextID(object);
data_pointers[i] = obj_count;
retval = MAPI_E_SUCCESS;
}
- else if (properties->aulPropTag[i] == PidTagLocalCommitTimeMax) {
- /* TODO: temporary hack */
- unix_time = time(NULL) & 0xffffff00;
- unix_to_nt_time(&nt_time, unix_time);
- ft = talloc_zero(data_pointers, struct FILETIME);
- ft->dwLowDateTime = (nt_time & 0xffffffff);
- ft->dwHighDateTime = nt_time >> 32;
- data_pointers[i] = ft;
- retval = MAPI_E_SUCCESS;
- }
- else if (properties->aulPropTag[i] == PR_ACCESS || properties->aulPropTag[i] == PR_ACCESS_LEVEL) {
+ else if (properties->aulPropTag[i] == PidTagLocalCommitTimeMax || properties->aulPropTag[i] == PR_ACCESS || properties->aulPropTag[i] == PR_ACCESS_LEVEL) {
struct mapistore_property_data prop_data;
mapistore_properties_get_properties(emsmdbp_ctx->mstore_ctx, contextID,
oxcfxics_ndr_push_properties(sync_data->ndr, sync_data->cutmarks_ndr, emsmdbp_ctx->mstore_ctx->nprops_ctx, &query_props, header_data_pointers, (enum MAPISTATUS *) header_retvals);
/** remaining props */
- if (table_object->object.table->prop_count > 5) {
- query_props.cValues = table_object->object.table->prop_count - 5;
- query_props.aulPropTag = table_object->object.table->properties + 5;
- oxcfxics_ndr_push_properties(sync_data->ndr, sync_data->cutmarks_ndr, emsmdbp_ctx->mstore_ctx->nprops_ctx, &query_props, data_pointers + 5, (enum MAPISTATUS *) retvals + 5);
+ if (table_object->object.table->prop_count > 7) {
+ query_props.cValues = table_object->object.table->prop_count - 7;
+ query_props.aulPropTag = table_object->object.table->properties + 7;
+ oxcfxics_ndr_push_properties(sync_data->ndr, sync_data->cutmarks_ndr, emsmdbp_ctx->mstore_ctx->nprops_ctx, &query_props, data_pointers + 7, (enum MAPISTATUS *) retvals + 7);
}
end_row:
void *data;
uint64_t folderID;
uint64_t messageID = 0;
- /* uint32_t contextID; */
- uint32_t handle;
struct oxcmsg_prop_index prop_index;
- /* bool mapistore = false; */
- /* struct indexing_folders_list *flist; */
int i;
DEBUG(4, ("exchange_emsmdb: [OXCMSG] OpenMessage (0x03)\n"));
folderID = request->FolderId;
/* Initialize Message object */
- handle = handles[mapi_req->handle_idx];
retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &object_handle);
if (request->OpenModeFlags == ReadOnly) {
/* Initialize Message object */
handle = handles[mapi_req->handle_idx];
retval = mapi_handles_add(emsmdbp_ctx->handles_ctx, handle, &message_handle);
- handles[mapi_repl->handle_idx] = message_handle->handle;
message_object = emsmdbp_object_message_init((TALLOC_CTX *)message_handle, emsmdbp_ctx, messageID, folder_object);
message_object->object.message->read_write = true;
break;
}
+ handles[mapi_repl->handle_idx] = message_handle->handle;
+
/* Add default properties to message MS-OXCMSG 3.2.5.2 */
retval = mapi_handles_set_private_data(message_handle, message_object);
#include "mapiproxy/libmapiserver/libmapiserver.h"
#include "dcesrv_exchange_emsmdb.h"
-static void oxomsg_mapistore_handle_target_entryid(struct emsmdbp_context *emsmdbp_ctx, struct emsmdbp_object *old_message_object)
+static void oxomsg_mapistore_handle_message_relocation(struct emsmdbp_context *emsmdbp_ctx, struct emsmdbp_object *old_message_object)
{
TALLOC_CTX *mem_ctx;
- enum MAPITAGS property = PidTagTargetEntryId;
- struct mapistore_property_data property_data;
+ enum MAPITAGS properties[] = { PidTagTargetEntryId, PidTagSentMailSvrEID };
+ uint32_t properties_count = sizeof(properties) / sizeof(enum MAPITAGS);
+ struct mapistore_property_data *property_data;
enum MAPITAGS ex_properties[] = { PidTagTargetEntryId, PidTagChangeKey, PidTagPredecessorChangeList };
struct SPropTagArray excluded_tags = { sizeof(ex_properties) / sizeof(enum MAPITAGS), ex_properties };
struct Binary_r *bin_data;
struct MessageEntryId *entryID;
+ struct PtypServerId *folderSvrID;
uint32_t contextID;
uint64_t folderID;
uint64_t messageID;
uint16_t replID;
- int ret;
+ int ret, i;
char *owner;
struct emsmdbp_object *folder_object;
struct emsmdbp_object *message_object;
mem_ctx = talloc_zero(NULL, TALLOC_CTX);
+ property_data = talloc_array(mem_ctx, struct mapistore_property_data, properties_count);
+
contextID = emsmdbp_get_contextID(old_message_object);
- mapistore_properties_get_properties(emsmdbp_ctx->mstore_ctx, contextID, old_message_object->backend_object, mem_ctx, 1, &property, &property_data);
- if (property_data.error) {
- return;
- }
+ mapistore_properties_get_properties(emsmdbp_ctx->mstore_ctx, contextID, old_message_object->backend_object, mem_ctx, properties_count, properties, property_data);
+ for (i = 0; i < properties_count; i++) {
+ if (property_data[i].error) {
+ continue;
+ }
- /* DEBUG(5, (__location__": old message fid: %.16"PRIx64"\n", old_message_object->parent_object->object.folder->folderID)); */
- /* DEBUG(5, (__location__": old message mid: %.16"PRIx64"\n", old_message_object->object.message->messageID)); */
+ /* DEBUG(5, (__location__": old message fid: %.16"PRIx64"\n", old_message_object->parent_object->object.folder->folderID)); */
+ /* DEBUG(5, (__location__": old message mid: %.16"PRIx64"\n", old_message_object->object.message->messageID)); */
- owner = emsmdbp_get_owner(old_message_object);
- bin_data = property_data.data;
- entryID = get_MessageEntryId(mem_ctx, bin_data);
- if (!entryID) {
- DEBUG(5, (__location__": invalid entryID\n"));
- return;
- }
+ owner = emsmdbp_get_owner(old_message_object);
+ bin_data = property_data[i].data;
- ret = emsmdbp_guid_to_replid(emsmdbp_ctx, owner, &entryID->FolderDatabaseGuid, &replID);
- if (ret) {
- DEBUG(5, (__location__": unable to deduce folder replID\n"));
- return;
- }
- folderID = (entryID->FolderGlobalCounter.value << 16) | replID;
- /* DEBUG(5, (__location__": dest folder id: %.16"PRIx64"\n", folderID)); */
+ switch (properties[i]) {
+ case PidTagTargetEntryId:
+ entryID = get_MessageEntryId(mem_ctx, bin_data);
+ if (!entryID) {
+ DEBUG(5, (__location__": invalid entryID\n"));
+ continue;
+ }
- ret = emsmdbp_guid_to_replid(emsmdbp_ctx, owner, &entryID->MessageDatabaseGuid, &replID);
- if (ret) {
- DEBUG(5, (__location__": unable to deduce message replID\n"));
- }
- messageID = (entryID->MessageGlobalCounter.value << 16) | replID;
- /* DEBUG(5, (__location__": dest message id: %.16"PRIx64"\n", messageID)); */
+ ret = emsmdbp_guid_to_replid(emsmdbp_ctx, owner, &entryID->FolderDatabaseGuid, &replID);
+ if (ret) {
+ DEBUG(5, (__location__": unable to deduce folder replID\n"));
+ continue;
+ }
+ folderID = (entryID->FolderGlobalCounter.value << 16) | replID;
+ /* DEBUG(5, (__location__": dest folder id: %.16"PRIx64"\n", folderID)); */
- if (emsmdbp_object_open_folder_by_fid(mem_ctx, emsmdbp_ctx, old_message_object, folderID, &folder_object) != MAPISTORE_SUCCESS) {
- DEBUG(5, (__location__": unable to open folder\n"));
- return;
- }
+ ret = emsmdbp_guid_to_replid(emsmdbp_ctx, owner, &entryID->MessageDatabaseGuid, &replID);
+ if (ret) {
+ DEBUG(5, (__location__": unable to deduce message replID\n"));
+ continue;
+ }
+ messageID = (entryID->MessageGlobalCounter.value << 16) | replID;
+ /* DEBUG(5, (__location__": dest message id: %.16"PRIx64"\n", messageID)); */
+ break;
+ case PidTagSentMailSvrEID:
+ folderSvrID = get_PtypServerId(mem_ctx, bin_data);
+ if (!folderSvrID) {
+ DEBUG(5, (__location__": invalid folderSvrID\n"));
+ continue;
+ }
- message_object = emsmdbp_object_message_init(mem_ctx, emsmdbp_ctx, messageID, folder_object);
- if (mapistore_folder_create_message(emsmdbp_ctx->mstore_ctx, contextID, folder_object->backend_object, message_object, messageID, false, &message_object->backend_object)) {
- DEBUG(5, (__location__": unable to create message in backend\n"));
- return;
- }
+ folderID = folderSvrID->FolderId;
+ openchangedb_get_new_folderID(emsmdbp_ctx->oc_ctx, &messageID);
+
+ /* DEBUG(5, (__location__": dest folder id: %.16"PRIx64"\n", folderID)); */
+ break;
+ default:
+ DEBUG(5, (__location__": invalid entryid property: %.8x\n", properties[i]));
+ continue;
+ }
+
+ if (emsmdbp_object_open_folder_by_fid(mem_ctx, emsmdbp_ctx, old_message_object, folderID, &folder_object) != MAPISTORE_SUCCESS) {
+ DEBUG(5, (__location__": unable to open folder\n"));
+ continue;
+ }
+
+ message_object = emsmdbp_object_message_init(mem_ctx, emsmdbp_ctx, messageID, folder_object);
+ if (mapistore_folder_create_message(emsmdbp_ctx->mstore_ctx, contextID, folder_object->backend_object, message_object, messageID, false, &message_object->backend_object)) {
+ DEBUG(5, (__location__": unable to create message in backend\n"));
+ continue;
+ }
- /* FIXME: (from oxomsg 3.2.5.1) PidTagMessageFlags: mfUnsent and mfRead must be cleared */
- emsmdbp_object_copy_properties(emsmdbp_ctx, old_message_object, message_object, &excluded_tags, true);
+ /* FIXME: (from oxomsg 3.2.5.1) PidTagMessageFlags: mfUnsent and mfRead must be cleared */
+ emsmdbp_object_copy_properties(emsmdbp_ctx, old_message_object, message_object, &excluded_tags, true);
- mapistore_message_save(emsmdbp_ctx->mstore_ctx, contextID, message_object->backend_object);
- mapistore_indexing_record_add_mid(emsmdbp_ctx->mstore_ctx, contextID, owner, messageID);
+ mapistore_message_save(emsmdbp_ctx->mstore_ctx, contextID, message_object->backend_object);
+ mapistore_indexing_record_add_mid(emsmdbp_ctx->mstore_ctx, contextID, owner, messageID);
+ }
talloc_free(mem_ctx);
}
flags = mapi_req->u.mapi_SubmitMessage.SubmitFlags;
owner = emsmdbp_get_owner(object);
mapistore_message_submit(emsmdbp_ctx->mstore_ctx, emsmdbp_get_contextID(object), object->backend_object, flags);
- oxomsg_mapistore_handle_target_entryid(emsmdbp_ctx, object);
+ oxomsg_mapistore_handle_message_relocation(emsmdbp_ctx, object);
mapistore_indexing_record_add_mid(emsmdbp_ctx->mstore_ctx, contextID, owner, messageID);
break;
}
case true:
mapistore_message_submit(emsmdbp_ctx->mstore_ctx, emsmdbp_get_contextID(object), object->backend_object, 0);
- oxomsg_mapistore_handle_target_entryid(emsmdbp_ctx, object);
+ oxomsg_mapistore_handle_message_relocation(emsmdbp_ctx, object);
/* mapistore_indexing_record_add_mid(emsmdbp_ctx->mstore_ctx, contextID, messageID); */
break;
}
data = talloc_zero(mem_ctx, uint32_t);
*((uint32_t *)data) = 0x00160000;
return data;
+ case PidTagAddressBookHierarchicalIsHierarchicalGroup:
+ data = talloc_zero(mem_ctx, uint32_t);
+ *((uint32_t *)data) = 0;
+ return data;
case PR_ENTRYID:
case PR_ORIGINAL_ENTRYID:
bin = talloc(mem_ctx, struct Binary_r);
{ PidTagAccount, "sAMAccountName", false, NULL },
{ PR_GIVEN_NAME, "givenName", false, NULL },
{ PR_SURNAME, "sn", false, NULL },
+ { PR_SURNAME_UNICODE, "sn", false, NULL },
{ PR_TRANSMITTABLE_DISPLAY_NAME, "displayName", false, NULL },
+ { PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE, "displayName", false, NULL },
{ PR_7BIT_DISPLAY_NAME, "displayName", false, NULL },
+ { PR_7BIT_DISPLAY_NAME_UNICODE, "displayName", false, NULL },
{ PR_EMS_AB_HOME_MTA, "homeMTA", true, "legacyExchangeDN" },
{ PR_EMS_AB_ASSOC_NT_ACCOUNT, "assocNTAccount", false, NULL },
{ PidTagCompanyName, "company", false, NULL },
+ { PidTagCompanyName_string8, "company", false, NULL },
{ PidTagDisplayName, "displayName", false, NULL },
{ PidTagDisplayName_string8, "displayName", false, NULL },
{ PidTagEmailAddress, "legacyExchangeDN", false, NULL },
{ PidTagEmailAddress_string8, "legacyExchangeDN", false, NULL },
{ PidTagAddressBookHomeMessageDatabase, "homeMDB", true, "legacyExchangeDN" },
+ { PidTagAddressBookHomeMessageDatabase_string8, "homeMDB", true, "legacyExchangeDN" },
{ PidTagAddressBookProxyAddresses, "proxyAddresses", false, NULL },
+ { PidTagAddressBookProxyAddresses_string8, "proxyAddresses", false, NULL },
{ PidTagAddressBookNetworkAddress, "networkAddress", false, NULL },
+ { PidTagAddressBookNetworkAddress_string8, "networkAddress", false, NULL },
{ PidTagTitle, "personalTitle", false, NULL },
{ PR_EMS_AB_OBJECT_GUID, "objectGUID", false, NULL },
{ 0, NULL, false, NULL }
PidTagAccessLevel_Error = 0x0FF7000A,
PidTagAccess_Error = 0x0FF4000A,
PidTagAccount = 0x3A00001F,
+ PidTagAccessControlListData = 0x3FE00102,
+ PidTagAccessControlListData_Error = 0x3FE0000A,
PidTagAccount_Error = 0x3A00000A,
PidTagAccount_string8 = 0x3A00001E,
PidTagAdditionalRenEntryIds = 0x36D81102,
PidTagAddressBookHierarchicalRootDepartment_Error = 0x8C98000A,
PidTagAddressBookHierarchicalShowInDepartments = 0x8C94000D,
PidTagAddressBookHierarchicalShowInDepartments_Error = 0x8C94000A,
- PidTagAddressBookHomeMessageDatabase = 0x8006001E,
+ PidTagAddressBookHomeMessageDatabase = 0x8006001F,
+ PidTagAddressBookHomeMessageDatabase_string8 = 0x8006001E,
PidTagAddressBookHomeMessageDatabase_Error = 0x8006000A,
PidTagAddressBookIsMaster = 0xFFFB000B,
PidTagAddressBookIsMaster_Error = 0xFFFB000A,
PidTagAddressBookModerationEnabled = 0x8CB5000B,
PidTagAddressBookModerationEnabled_Error = 0x8CB5000A,
PidTagAddressBookNetworkAddress = 0x8170101F,
+ PidTagAddressBookNetworkAddress_string8 = 0x8170101E,
PidTagAddressBookNetworkAddress_Error = 0x8170000A,
PidTagAddressBookObjectDistinguishedName = 0x803C001F,
PidTagAddressBookObjectDistinguishedName_Error = 0x803C000A,
PidTagAddressBookPhoneticSurname_Error = 0x8C8F000A,
PidTagAddressBookPhoneticSurname_string8 = 0x8C8F001E,
PidTagAddressBookProxyAddresses = 0x800F101F,
+ PidTagAddressBookProxyAddresses_string8 = 0x800F101E,
PidTagAddressBookProxyAddresses_Error = 0x800F000A,
PidTagAddressBookPublicDelegates = 0x8015000D,
PidTagAddressBookPublicDelegates_Error = 0x8015000A,
]
interface property
{
+ typedef [v1_enum] enum {
+ seOpenToDelete = 0x00000001,
+ seNoFrame = 0x00000008,
+ seCoerceToInbox = 0x00000010,
+ seOpenToCopy = 0x00000020,
+ seOpenToMove = 0x00000040,
+ seOpenForCtxMenu = 0x00000100,
+ seCannotUndoDelete = 0x00000400,
+ seCannotUndoCopy = 0x00000800,
+ seCannotUndoMove = 0x00001000,
+ seHasScript = 0x00002000,
+ seOpenToPermDelete = 0x00004000
+ } SideEffects;
+
typedef [enum16bit] enum {
RecurFrequency_Daily = 0x200A,
RecurFrequency_Weekly = 0x200B,
RecurFrequency_Monthly = 0x200C,
RecurFrequency_Yearly = 0x200D
} RecurFrequency;
-
+
typedef [enum16bit] enum {
PatternType_Day = 0x0,
PatternType_Week = 0x1,
eitLTPPublicNewsgroupFolder = 0x0c
} EntryIdFolderType;
+ /* PtypServerId */
+ typedef [public,flag(NDR_NOALIGN)] struct {
+ uint8 ours;
+ dlong FolderId;
+ dlong MessageId;
+ int32 Instance;
+ } PtypServerId;
+
/* FolderEntryId */
typedef [public,flag(NDR_NOALIGN)] struct {
uint32 Flags;
"Address Properties",
"Address Properties Property set",
"Appointment Property set",
+ "Appointment",
"Archive",
"BestBody",
"Calendar",
+ "Calendar Document",
"Calendar Document Property set",
"Calendar Property set",
"Common",
"Conversation Actions",
"Conversations",
"Email",
+ "E-mail",
"Email Property set",
"Exchange",
"Exchange Administrative",
"SMS",
"Spam",
"Sticky Notes",
+ "Structured Documents",
"Structured Documents Property set",
"Sync",
"Table Properties",