added minimal stub for RopDeletePropertiesNoReplicate
authorwsourdeau <wsourdeau@71d39326-ef09-db11-b2a4-00e04c779ad1>
Tue, 11 Jan 2011 22:02:29 +0000 (22:02 +0000)
committerwsourdeau <wsourdeau@71d39326-ef09-db11-b2a4-00e04c779ad1>
Tue, 11 Jan 2011 22:02:29 +0000 (22:02 +0000)
git-svn-id: https://svn.openchange.org/openchange@2516 71d39326-ef09-db11-b2a4-00e04c779ad1

branches/sogo/mapiproxy/libmapiserver/libmapiserver.h
branches/sogo/mapiproxy/libmapiserver/libmapiserver_oxcprpt.c
branches/sogo/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.c
branches/sogo/mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.h
branches/sogo/mapiproxy/servers/default/emsmdb/oxcprpt.c

index 7ce526db34c6953ba172a845a11aa5599bddcc03..829179075faa088c1543fa615c35575774996315 100644 (file)
  */
 #define        SIZE_DFLT_ROPGETPROPERTYIDSFROMNAMES    2
 
+/**
+   \details GetPropertyIdsFromNames has fixed response size for:
+   -# PropertyProblemCount: uint16_t
+ */
+#define SIZE_DFLT_ROPDELETEPROPERTIESNOREPLICATE 2
+
 /**
    \details EmptyFolder has fixed response size for:
    -# PartialCompletion: uint8_t
@@ -377,6 +383,7 @@ uint16_t libmapiserver_RopReadStream_size(struct EcDoRpc_MAPI_REPL *);
 uint16_t libmapiserver_RopWriteStream_size(struct EcDoRpc_MAPI_REPL *);
 uint16_t libmapiserver_RopGetStreamSize_size(struct EcDoRpc_MAPI_REPL *);
 uint16_t libmapiserver_RopGetPropertyIdsFromNames_size(struct EcDoRpc_MAPI_REPL *);
+uint16_t libmapiserver_RopDeletePropertiesNoReplicate_size(struct EcDoRpc_MAPI_REPL *);
 int libmapiserver_push_property(TALLOC_CTX *, struct smb_iconv_convenience *, uint32_t, const void *, DATA_BLOB *, uint8_t, uint8_t, uint8_t);
 struct SRow *libmapiserver_ROP_request_to_properties(TALLOC_CTX *, void *, uint8_t);
 
index 92f9e94e69a33d02b9ac7475d2ba0585dc283093..ee7dffa6bfcdef674eb722552d986a406dc1d2b7 100644 (file)
@@ -217,6 +217,31 @@ _PUBLIC_ uint16_t libmapiserver_RopGetPropertyIdsFromNames_size(struct EcDoRpc_M
 }
 
 
+/**
+   \details Calculate DeletePropertiesNoReplicate Rop size
+
+   \param response pointer to the DeletePropertiesNoReplicate
+   EcDoRpc_MAPI_REPL structure
+
+   \return Size of DeletePropertiesNoReplicate response
+ */
+_PUBLIC_ uint16_t libmapiserver_RopDeletePropertiesNoReplicate_size(struct EcDoRpc_MAPI_REPL *response)
+{
+       uint16_t        size = SIZE_DFLT_MAPI_RESPONSE;
+
+       if (!response || response->error_code) {
+               return size;
+       }
+
+       size += SIZE_DFLT_ROPDELETEPROPERTIESNOREPLICATE;
+       size += (response->u.mapi_DeletePropertiesNoReplicate.PropertyProblemCount
+                * (sizeof(uint16_t) /* PropertyProblem.Index */
+                   + sizeof(uint32_t) /* PropertyProblem.PropertyTag */
+                   + sizeof(uint32_t) /* PropertyProblem.ErrorCode */));
+
+       return size;
+}
+
 /**
    \details Add a property value to a DATA blob. This convenient
    function should be used when creating a GetPropertiesSpecific reply
index 6b81930ace65f1856912b12d8cf40f9f8c184ba7..aa463535daac6c264b4e816a6b34e2c5deb75584 100644 (file)
@@ -644,7 +644,12 @@ static struct mapi_response *EcDoRpc_process_transaction(TALLOC_CTX *mem_ctx,
                /* op_MAPI_SyncUploadStateStreamEnd: 0x77 */
                /* op_MAPI_SyncImportMessageMove: 0x78 */
                /* op_MAPI_SetPropertiesNoReplicate: 0x79 */
-               /* op_MAPI_DeletePropertiesNoReplicate: 0x7a */
+               case op_MAPI_DeletePropertiesNoReplicate: /* 0x7a */
+                       retval = EcDoRpc_RopDeletePropertiesNoReplicate(mem_ctx, emsmdbp_ctx,
+                                                                       &(mapi_request->mapi_req[i]),
+                                                                       &(mapi_response->mapi_repl[idx]),
+                                                                       mapi_response->handles, &size);
+                       break;
                /* op_MAPI_GetStoreState: 0x7b */
                /* op_MAPI_SyncOpenCollector: 0x7e */
                /* op_MAPI_GetLocalReplicaIds: 0x7f */
index 15294dbafb67186f29b59f620df72da6df7babbf..aed81a88c47cecd6f850baab124cf73d1fed4906 100644 (file)
@@ -228,6 +228,7 @@ enum MAPISTATUS EcDoRpc_RopReadStream(TALLOC_CTX *, struct emsmdbp_context *, st
 enum MAPISTATUS EcDoRpc_RopWriteStream(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
 enum MAPISTATUS EcDoRpc_RopGetStreamSize(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
 enum MAPISTATUS EcDoRpc_RopGetPropertyIdsFromNames(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
+enum MAPISTATUS EcDoRpc_RopDeletePropertiesNoReplicate(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
 
 /* definitions from oxcstor.c */
 enum MAPISTATUS        EcDoRpc_RopLogon(TALLOC_CTX *, struct emsmdbp_context *, struct EcDoRpc_MAPI_REQ *, struct EcDoRpc_MAPI_REPL *, uint32_t *, uint16_t *);
index fb0b79606d1c1c536153d8faa3919bbe5fcc1fff..71f2da06f57287682c21b7ad2a85badd50863ab9 100644 (file)
@@ -561,7 +561,7 @@ _PUBLIC_ enum MAPISTATUS EcDoRpc_RopDeleteProperties(TALLOC_CTX *mem_ctx,
                                                     struct EcDoRpc_MAPI_REPL *mapi_repl,
                                                     uint32_t *handles, uint16_t *size)
 {
-       DEBUG(4, ("exchange_emsmdb: [OXCPRPT] DeleteProperties (0x0b)\n"));
+       DEBUG(4, ("exchange_emsmdb: [OXCPRPT] DeleteProperties (0x0b) -- stub\n"));
 
        /* Sanity checks */
        OPENCHANGE_RETVAL_IF(!emsmdbp_ctx, MAPI_E_NOT_INITIALIZED, NULL);
@@ -1003,3 +1003,45 @@ _PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetPropertyIdsFromNames(TALLOC_CTX *mem_ctx,
 
        return MAPI_E_SUCCESS;
 }
+
+/**
+   \details EcDoRpc DeletePropertiesNoReplicate (0x7a) Rop. deletes property
+   values from an object without invoking replication.
+
+   \param mem_ctx pointer to the memory context
+   \param emsmdbp_ctx pointer to the emsmdb provider context
+   \param mapi_req pointer to the GetPropertyIdsFromNames
+   EcDoRpc_MAPI_REQ structure
+   \param mapi_repl pointer to the GetPropertyIdsFromNames
+   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_RopDeletePropertiesNoReplicate(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: [OXCPRPT] DeletePropertiesNoReplicate (0x7a) -- stub\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;
+
+       mapi_repl->u.mapi_DeletePropertiesNoReplicate.PropertyProblemCount = 0;
+       mapi_repl->u.mapi_DeletePropertiesNoReplicate.PropertyProblem = NULL;
+
+       *size += libmapiserver_RopDeletePropertiesNoReplicate_size(mapi_repl);
+
+       return MAPI_E_SUCCESS;
+}