2
libmapiserver - MAPI library for Server side
6
Copyright (C) Brad Hards 2010
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 3 of the License, or
11
(at your option) any later version.
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with this program. If not, see <http://www.gnu.org/licenses/>.
23
\file libmapiserver_oxomsg.c
25
\brief OXOMSG ROP Response size calculations
28
#include "libmapiserver.h"
32
\details Calculate SubmitMessage (0x32) Rop size
34
\param response pointer to the SubmitMessage EcDoRpc_MAPI_REPL
37
\return Size of SubmitMessage response
39
_PUBLIC_ uint16_t libmapiserver_RopSubmitMessage_size(struct EcDoRpc_MAPI_REPL *response)
41
return SIZE_DFLT_MAPI_RESPONSE;
46
\details Calculate SetSpooler (0x47) Rop size
48
\param response pointer to the SetSpooler EcDoRpc_MAPI_REPL
51
\return Size of SetSpooler response
53
_PUBLIC_ uint16_t libmapiserver_RopSetSpooler_size(struct EcDoRpc_MAPI_REPL *response)
55
return SIZE_DFLT_MAPI_RESPONSE;
60
\details Calculate GetAddressTypes (0x49) Rop size
62
\param response pointer to the GetAddressTypes EcDoRpc_MAPI_REPL structure
64
\return Size of GetAddressTypes response
66
_PUBLIC_ uint16_t libmapiserver_RopGetAddressTypes_size(struct EcDoRpc_MAPI_REPL *response)
68
uint16_t size = SIZE_DFLT_MAPI_RESPONSE;
70
if (!response || response->error_code) {
74
size += SIZE_DFLT_ROPGETADDRESSTYPES;
75
/* The length of the strings is variable, but given by the size parameter */
76
size += response->u.mapi_AddressTypes.size;
82
\details Calculate GetTransportFolder (0x6d) ROP size
84
\param response pointer to the GetTransportFolder EcDoRpc_MAPI_REPL structure
86
\return Size of GetTransportFolder response
88
_PUBLIC_ uint16_t libmapiserver_RopGetTransportFolder_size(struct EcDoRpc_MAPI_REPL *response)
90
uint16_t size = SIZE_DFLT_MAPI_RESPONSE;
92
if (!response || response->error_code) {
96
size += SIZE_DFLT_ROPGETTRANSPORTFOLDER;
103
\details Calculate OptionsData (0x6f) Rop size
105
\param response pointer to the OptionsData EcDoRpc_MAPI_REPL structure
107
\return Size of OptionsData response
109
_PUBLIC_ uint16_t libmapiserver_RopOptionsData_size(struct EcDoRpc_MAPI_REPL *response)
111
uint16_t size = SIZE_DFLT_MAPI_RESPONSE;
113
if (!response || response->error_code) {
117
size += SIZE_DFLT_ROPOPTIONSDATA;
118
size += response->u.mapi_OptionsData.OptionsInfo.cb;
119
size += response->u.mapi_OptionsData.HelpFileSize;
120
if (response->u.mapi_OptionsData.HelpFileSize != 0) {
121
size += strlen(response->u.mapi_OptionsData.HelpFileName.HelpFileName) + 1;