mapiproxy/libmapiserver.$(SHLIBEXT).$(PACKAGE_VERSION): mapiproxy/libmapiserver/libmapiserver_oxcstor.po \
mapiproxy/libmapiserver/libmapiserver_oxcprpt.po \
mapiproxy/libmapiserver/libmapiserver_oxcfold.po \
+ mapiproxy/libmapiserver/libmapiserver_oxcfxics.po \
mapiproxy/libmapiserver/libmapiserver_oxctabl.po \
mapiproxy/libmapiserver/libmapiserver_oxcmsg.po \
mapiproxy/libmapiserver/libmapiserver_oxcnotif.po \
mapiproxy/servers/default/emsmdb/oxcstor.po \
mapiproxy/servers/default/emsmdb/oxcprpt.po \
mapiproxy/servers/default/emsmdb/oxcfold.po \
+ mapiproxy/servers/default/emsmdb/oxcfxics.po \
mapiproxy/servers/default/emsmdb/oxctabl.po \
mapiproxy/servers/default/emsmdb/oxcmsg.po \
mapiproxy/servers/default/emsmdb/oxcnotif.po \
utils/mapitest/module.o \
utils/mapitest/modules/module_oxcstor.o \
utils/mapitest/modules/module_oxcfold.o \
+ utils/mapitest/modules/module_oxcfxics.o \
utils/mapitest/modules/module_oxomsg.o \
utils/mapitest/modules/module_oxcmsg.o \
utils/mapitest/modules/module_oxcprpt.o \
utils/mapitest/module.c \
utils/mapitest/modules/module_oxcstor.c \
utils/mapitest/modules/module_oxcfold.c \
+ utils/mapitest/modules/module_oxcfxics.c \
utils/mapitest/modules/module_oxomsg.c \
utils/mapitest/modules/module_oxcmsg.c \
utils/mapitest/modules/module_oxcprpt.c \
+ utils/mapitest/modules/module_oxcfxics.c \
utils/mapitest/modules/module_oxctable.c \
utils/mapitest/modules/module_oxorule.c \
utils/mapitest/modules/module_oxcnotif.c \
- utils/mapitest/modules/module_oxcfxics.c \
utils/mapitest/modules/module_oxcperm.c \
utils/mapitest/modules/module_nspi.c \
utils/mapitest/modules/module_noserver.c \
*/
#define SIZE_DFLT_LONGTERMID 24
+/**
+ \details FastTransferSourceGetBuffer:
+ -# TransferStatus: uint16_t
+ -# InProgressCount: uint16_t
+ -# TotalStepCount: uint16_t
+ -# Reserved (1 byte): uint8_t
+ -# TransferBufferSize (2 bytes): uint16_t
+ -# TransferBuffer (variable): conditional (ReturnValue != 0x480)
+ -# BackoffTime (4 bytes): conditional (ReturnValue == 0x480), uint32_t
+ */
+#define SIZE_DFLT_ROPFASTTRANSFERSOURCEGETBUFFER 9
+
__BEGIN_DECLS
/* definitions from libmapiserver_oxcfold.c */
/* definitions from libmapiserver_oxcperm.c */
uint16_t libmapiserver_RopGetPermissionsTable_size(struct EcDoRpc_MAPI_REPL *);
+/* definitions from libmapiserver_oxcfxics.c */
+uint16_t libmapiserver_RopFastTransferSourceCopyTo_size(struct EcDoRpc_MAPI_REPL *response);
+uint16_t libmapiserver_RopFastTransferSourceGetBuffer_size(struct EcDoRpc_MAPI_REPL *response);
+
__END_DECLS
#endif /* ! __LIBMAPISERVER_H__ */
--- /dev/null
+/*
+ OpenChange Server implementation
+
+ EMSMDBP: EMSMDB Provider implementation
+
+ Copyright (C) Inverse inc. 2010
+
+ 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 libmapiserver_oxcfxics.c
+
+ \brief OXCFXICS ROP Response size calculations
+ */
+
+#include "libmapiserver.h"
+
+/**
+ \details Calculate FastTransferSourceCopyTo (0x4d) Rop size
+
+ \param response pointer to the FastTransferSourceCopyTo EcDoRpc_MAPI_REPL
+ structure
+
+ \return Size of FastTransferSourceCopyTo response
+ */
+_PUBLIC_ uint16_t libmapiserver_RopFastTransferSourceCopyTo_size(struct EcDoRpc_MAPI_REPL *response)
+{
+ return SIZE_DFLT_MAPI_RESPONSE;
+}
+
+
+/**
+ \details Calculate FastTransferSourceGetBuffer (0x4d) Rop size
+
+ \param response pointer to the FastTransferSourceGetBuffer EcDoRpc_MAPI_REPL
+ structure
+
+ \return Size of FastTransferSourceGetBuffer response
+ */
+_PUBLIC_ uint16_t libmapiserver_RopFastTransferSourceGetBuffer_size(struct EcDoRpc_MAPI_REPL *response)
+{
+ uint16_t size = SIZE_DFLT_MAPI_RESPONSE;
+
+ if (!response || response->error_code) {
+ if (response->error_code == ecServerBusy) {
+ size += sizeof (uint32_t); /* size of BackoffTime */
+ }
+ return size;
+ }
+
+ size += SIZE_DFLT_ROPFASTTRANSFERSOURCEGETBUFFER + response->u.mapi_FastTransferSourceGetBuffer.TransferBuffer.length;
+
+ return size;
+}
/* op_MAPI_TransportSend: 0x4a */
/* op_MAPI_FastTransferSourceCopyMessages: 0x4b */
/* op_MAPI_FastTransferSourceCopyFolder: 0x4c */
- /* op_MAPI_FastTransferSourceCopyTo: 0x4d */
- /* op_MAPI_FastTransferSourceGetBuffer: 0x4e */
+ case op_MAPI_FastTransferSourceCopyTo: /* 0x4d */
+ retval = EcDoRpc_RopFastTransferSourceCopyTo(mem_ctx, emsmdbp_ctx,
+ &(mapi_request->mapi_req[i]),
+ &(mapi_response->mapi_repl[idx]),
+ mapi_response->handles, &size);
+ break;
+ case op_MAPI_FastTransferSourceGetBuffer: /* 0x4e */
+ retval = EcDoRpc_RopFastTransferSourceGetBuffer(mem_ctx, emsmdbp_ctx,
+ &(mapi_request->mapi_req[i]),
+ &(mapi_response->mapi_repl[idx]),
+ mapi_response->handles, &size);
+ break;
case op_MAPI_FindRow: /* 0x4f */
retval = EcDoRpc_RopFindRow(mem_ctx, emsmdbp_ctx,
&(mapi_request->mapi_req[i]),
/* definitions from oxcperm.c */
enum MAPISTATUS EcDoRpc_RopGetPermissionsTable(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
+/* definitions from oxcfxics.c */
+enum MAPISTATUS EcDoRpc_RopFastTransferSourceCopyTo(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
+enum MAPISTATUS EcDoRpc_RopFastTransferSourceGetBuffer(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
__END_DECLS
--- /dev/null
+/*
+ OpenChange Server implementation
+
+ EMSMDBP: EMSMDB Provider implementation
+
+ Copyright (C) Inverse inc. 2010
+
+ 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 oxcfxics.c
+
+ \brief FastTransfer and ICS object routines and Rops
+ */
+
+#include "mapiproxy/libmapiserver/libmapiserver.h"
+#include "dcesrv_exchange_emsmdb.h"
+
+/**
+ \details EcDoRpc EcDoRpc_RopFastTransferSourceCopyTo (0x4d) Rop. This operation initializes a FastTransfer operation to download content from a given messaging object and its descendant subobjects.
+
+ \param mem_ctx pointer to the memory context
+ \param emsmdbp_ctx pointer to the emsmdb provider context
+ \param mapi_req pointer to the OpenMessage EcDoRpc_MAPI_REQ
+ structure
+ \param mapi_repl pointer to the OpenMessage EcDoRpc_MAPI_REPL
+ structure
+ \param handles pointer to the MAPI handles array
+ \param size pointer to the mapi_response size to update
+
+ \return MAPI_E_SUCCESS on success, otherwise MAPI error
+ */
+_PUBLIC_ enum MAPISTATUS EcDoRpc_RopFastTransferSourceCopyTo(TALLOC_CTX *mem_ctx,
+ struct emsmdbp_context *emsmdbp_ctx,
+ struct EcDoRpc_MAPI_REQ *mapi_req,
+ struct EcDoRpc_MAPI_REPL *mapi_repl,
+ uint32_t *handles, uint16_t *size)
+{
+ DEBUG(4, ("exchange_emsmdb: [OXCMSG] FastTransferSourceCopyTo (0x4d) - unimplemented\n"));
+
+ /* Sanity checks */
+ OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
+ OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
+ OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
+ OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
+ OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
+
+ mapi_repl->opnum = mapi_req->opnum;
+ mapi_repl->error_code = MAPI_E_SUCCESS;
+ mapi_repl->handle_idx = mapi_req->handle_idx;
+
+ /* TODO: actually implement this */
+ mapi_repl->error_code = MAPI_E_NO_SUPPORT;
+
+ *size += libmapiserver_RopFastTransferSourceCopyTo_size(mapi_repl);
+
+ return MAPI_E_SUCCESS;
+}
+
+/**
+ \details EcDoRpc EcDoRpc_RopFastTransferSourceGetBuffer (0x4e) Rop. This operation downloads the next portion of a FastTransfer stream that is produced by a previously configured download operation.
+
+ \param mem_ctx pointer to the memory context
+ \param emsmdbp_ctx pointer to the emsmdb provider context
+ \param mapi_req pointer to the OpenMessage EcDoRpc_MAPI_REQ
+ structure
+ \param mapi_repl pointer to the OpenMessage EcDoRpc_MAPI_REPL
+ structure
+ \param handles pointer to the MAPI handles array
+ \param size pointer to the mapi_response size to update
+
+ \return MAPI_E_SUCCESS on success, otherwise MAPI error
+ */
+_PUBLIC_ enum MAPISTATUS EcDoRpc_RopFastTransferSourceGetBuffer(TALLOC_CTX *mem_ctx,
+ struct emsmdbp_context *emsmdbp_ctx,
+ struct EcDoRpc_MAPI_REQ *mapi_req,
+ struct EcDoRpc_MAPI_REPL *mapi_repl,
+ uint32_t *handles, uint16_t *size)
+{
+ DEBUG(4, ("exchange_emsmdb: [OXCMSG] FastTransferSourceGetBuffer (0x4e) - unimplemented\n"));
+
+ /* Sanity checks */
+ OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
+ OPENCHANGE_RETVAL_IF(!mapi_req, MAPI_E_INVALID_PARAMETER, NULL);
+ OPENCHANGE_RETVAL_IF(!mapi_repl, MAPI_E_INVALID_PARAMETER, NULL);
+ OPENCHANGE_RETVAL_IF(!handles, MAPI_E_INVALID_PARAMETER, NULL);
+ OPENCHANGE_RETVAL_IF(!size, MAPI_E_INVALID_PARAMETER, NULL);
+
+ mapi_repl->opnum = mapi_req->opnum;
+ mapi_repl->error_code = MAPI_E_SUCCESS;
+ mapi_repl->handle_idx = mapi_req->handle_idx;
+
+ /* TODO: actually implement this */
+ mapi_repl->error_code = MAPI_E_NO_SUPPORT;
+
+ *size += libmapiserver_RopFastTransferSourceGetBuffer_size(mapi_repl);
+
+ return MAPI_E_SUCCESS;
+}