} SPropTagArray;
typedef struct {
- uint32 cb;
- [size_is(cb)][unique] uint8 *lpb;
- } SBinary;
+ [range(0,2097152)] uint32 cb;
+ [size_is(cb)] uint8 *lpb;
+ } Binary_r;
typedef [public] struct {
uint32 dwLowDateTime;
typedef struct {
[range(0,100000)] uint32 cValues;
- [size_is(cValues)] SBinary *lpbin;
+ [size_is(cValues)] Binary_r *lpbin;
} BinaryArray_r;
typedef [flag(NDR_NOALIGN)] struct {
[case(PT_BOOLEAN)] uint8 b;
[case(PT_I8)] dlong d;
[case(PT_STRING8)][unique][string,charset(DOS)] uint8 *lpszA;
- [case(PT_BINARY)] SBinary bin;
+ [case(PT_BINARY)] Binary_r bin;
[case(PT_UNICODE)][string,charset(UTF16)] uint16 *lpszW;
[case(PT_CLSID)] FlatUID_r *lpguid;
[case(PT_SYSTIME)] FILETIME ft;
m_data_size = *(static_cast<const uint32_t*>(properties[PR_ATTACH_SIZE]));
- const SBinary* attachment_data = static_cast<const SBinary*>(properties[PR_ATTACH_DATA_BIN]);
+ const Binary_r* attachment_data = static_cast<const Binary_r*>(properties[PR_ATTACH_DATA_BIN]);
// Don't load PR_ATTACH_DATA_BIN if it's embedded in message.
// NOTE: Use RopOpenEmbeddedMessage when it is implemented.
struct FILETIME *pt_filetime;
struct GUID *pt_clsid;
struct SBinary_short pt_binary;
- struct SBinary *sbin;
+ struct Binary_r *sbin;
struct mapi_SLPSTRArray pt_slpstr;
struct StringArray_r *slpstr;
uint32_t i;
case PT_BINARY:
ndr_pull_SBinary_short(ndr, NDR_SCALARS, &pt_binary);
*offset = ndr->offset;
- sbin = talloc_zero(mem_ctx, struct SBinary);
+ sbin = talloc_zero(mem_ctx, struct Binary_r);
sbin->cb = pt_binary.cb;
sbin->lpb = pt_binary.lpb;
return (void *) sbin;
lpProps->value.lpszA = (const char *) data;
break;
case PT_BINARY:
- lpProps->value.bin = *((const struct SBinary *)data);
+ lpProps->value.bin = *((const struct Binary_r *)data);
break;
case PT_UNICODE:
lpProps->value.lpszW = (const char *) data;
\details Retrieve a RecurrencePattern structure from a binary blob
\param mem_ctx pointer to the memory context
- \param bin pointer to the SBinary structure with non-mapped
+ \param bin pointer to the Binary_r structure with non-mapped
reccurrence data
\return Allocated RecurrencePattern structure on success,
finished.
*/
_PUBLIC_ struct RecurrencePattern *get_RecurrencePattern(TALLOC_CTX *mem_ctx,
-struct SBinary *bin)
+ struct Binary_r *bin)
{
struct RecurrencePattern *RecurrencePattern = NULL;
struct ndr_pull *ndr;
\details Retrieve a TimeZoneStruct structure from a binary blob
\param mem_ctx pointer to the memory context
- \param bin pointer to the SBinary structure with raw TimeZoneStruct
- data
+ \param bin pointer to the Binary_r structure with raw
+ TimeZoneStruct data
\return Allocated TimeZoneStruct structure on success, otherwise
NULL
finished.
*/
_PUBLIC_ struct TimeZoneStruct *get_TimeZoneStruct(TALLOC_CTX *mem_ctx,
- struct SBinary *bin)
+ struct Binary_r *bin)
{
struct TimeZoneStruct *TimeZoneStruct = NULL;
struct ndr_pull *ndr;
\details Retrieve a GlobalObjectId structure from a binary blob
\param mem_ctx pointer to the memory context
-
- \param bin pointer to the SBinary structure with raw GlobalObjectId
- data
+ \param bin pointer to the Binary_r structure with raw
+ GlobalObjectId data
\return Allocated GlobalObjectId structure on success, otherwise
NULL
finished.
*/
_PUBLIC_ struct GlobalObjectId *get_GlobalObjectId(TALLOC_CTX *mem_ctx,
- struct SBinary *bin)
+ struct Binary_r *bin)
{
struct GlobalObjectId *GlobalObjectId = NULL;
struct ndr_pull *ndr;
return guid;
}
-_PUBLIC_ struct SBinary *generate_recipient_entryid(TALLOC_CTX *mem_ctx, const char *recipient_id)
+_PUBLIC_ struct Binary_r *generate_recipient_entryid(TALLOC_CTX *mem_ctx, const char *recipient_id)
{
- struct SBinary *entryid;
+ struct Binary_r *entryid;
uint32_t off;
char *guid = (char *) NULL;
- entryid = talloc(mem_ctx, struct SBinary);
+ entryid = talloc(mem_ctx, struct Binary_r);
entryid->cb = sizeof (uint32_t) + sizeof (MAPI_LOCAL_UID) + sizeof (MAPI_LOCAL_UID_END) + 1;
if (recipient_id) {
*value = talloc_memdup(mem_ctx, (const void *)&lpProp.ft, sizeof (struct FILETIME));
return OCPF_SUCCESS;
case PT_BINARY:
- *value = (const void *)talloc_zero(mem_ctx, struct SBinary);
- ((struct SBinary *)*value)->cb = lpProp.bin.cb;
- ((struct SBinary *)*value)->lpb = talloc_memdup(mem_ctx, (const void *)lpProp.bin.lpb, lpProp.bin.cb);
+ *value = (const void *)talloc_zero(mem_ctx, struct Binary_r);
+ ((struct Binary_r *)*value)->cb = lpProp.bin.cb;
+ ((struct Binary_r *)*value)->lpb = talloc_memdup(mem_ctx, (const void *)lpProp.bin.lpb, lpProp.bin.cb);
return OCPF_SUCCESS;
case PT_MV_STRING8:
*value = (const void *)talloc_zero(mem_ctx, struct StringArray_r);
}
-int ocpf_binary_add(const char *filename, struct SBinary *bin)
+int ocpf_binary_add(const char *filename, struct Binary_r *bin)
{
int fd;
struct stat sb;
static enum MAPISTATUS ocpf_stream(TALLOC_CTX *mem_ctx,
mapi_object_t *obj_parent,
uint32_t aulPropTag,
- struct SBinary *bin)
+ struct Binary_r *bin)
{
enum MAPISTATUS retval;
mapi_object_t obj_stream;
for (nel = ocpf->nprops, i = 0; SPropTagArray->aulPropTag[i] && nel->next; nel = nel->next, i++) {
if (SPropTagArray->aulPropTag[i]) {
if (((SPropTagArray->aulPropTag[i] & 0xFFFF) == PT_BINARY) &&
- (((struct SBinary *)nel->value)->cb > MAX_READ_SIZE)) {
+ (((struct Binary_r *)nel->value)->cb > MAX_READ_SIZE)) {
retval = ocpf_stream(mem_ctx, obj_message, SPropTagArray->aulPropTag[i],
- (struct SBinary *)nel->value);
+ (struct Binary_r *)nel->value);
MAPI_RETVAL_IF(retval, retval, NULL);
} else {
ocpf->lpProps = add_SPropValue(mem_ctx, ocpf->lpProps, &ocpf->cValues,
if (ocpf->props && ocpf->props->next) {
for (pel = ocpf->props; pel->next; pel = pel->next) {
if (((pel->aulPropTag & 0xFFFF) == PT_BINARY) &&
- (((struct SBinary *)pel->value)->cb > MAX_READ_SIZE)) {
+ (((struct Binary_r *)pel->value)->cb > MAX_READ_SIZE)) {
retval = ocpf_stream(mem_ctx, obj_message, pel->aulPropTag,
- (struct SBinary *)pel->value);
+ (struct Binary_r *)pel->value);
MAPI_RETVAL_IF(retval, retval, NULL);
} else {
ocpf->lpProps = add_SPropValue(mem_ctx, ocpf->lpProps, &ocpf->cValues,
return line;
}
-static char *ocpf_write_binary(const struct SBinary *bin)
+static char *ocpf_write_binary(const struct Binary_r *bin)
{
uint32_t i;
char *line;
*found = true;
break;
case PT_BINARY:
- line = ocpf_write_binary((const struct SBinary *)value);
+ line = ocpf_write_binary((const struct Binary_r *)value);
*found = true;
break;
case PT_MV_STRING8:
set an entry id
*/
-NTSTATUS emsabp_setEntryId(TALLOC_CTX *mem_ctx, struct entry_id *entry, struct SBinary *bin)
+NTSTATUS emsabp_setEntryId(TALLOC_CTX *mem_ctx, struct entry_id *entry, struct Binary_r *bin)
{
struct GUID *guid;
const char *guid_str;
struct ldb_message_element *ldb_element;
struct ldb_message *ldb_res;
struct StringArray_r *mv_string;
- struct SBinary *bin;
+ struct Binary_r *bin;
const char *ldb_str;
const char *x500 = NULL;
NTSTATUS status;
data = talloc_strdup(mem_ctx, EMSABP_ADDRTYPE);
return (data);
case PR_ENTRYID:
- bin = talloc(mem_ctx, struct SBinary);
+ bin = talloc(mem_ctx, struct Binary_r);
emsabp_setEntryId(mem_ctx, entry, bin);
return (bin);
case PR_OBJECT_TYPE:
*((uint32_t *)data) = DT_MAILUSER;
return (data);
case PR_INSTANCE_KEY:
- bin = talloc(mem_ctx, struct SBinary);
+ bin = talloc(mem_ctx, struct Binary_r);
bin->cb = 4;
bin->lpb = talloc_size(mem_ctx, sizeof(uint8_t) * bin->cb);
memset(bin->lpb, 0, bin->cb);
/*
* emsabp_hierarchy_get_entryID:
- * Generate the PR_ENTRYID SBinary structure for the given recipient
+ * Generate the PR_ENTRYID Binary_r structure for the given recipient
*
*/
-struct SBinary *emsabp_hierarchy_get_entryID(TALLOC_CTX *mem_ctx, struct GUID *guid, bool containerID)
+struct Binary_r *emsabp_hierarchy_get_entryID(TALLOC_CTX *mem_ctx, struct GUID *guid, bool containerID)
{
- struct SBinary *entryID;
+ struct Binary_r *entryID;
char *guid_str = (char *) NULL;
if (!containerID) {
static int exchange2ical_get_properties(TALLOC_CTX *mem_ctx, struct SRow *aRow, struct exchange2ical *exchange2ical)
{
- struct SBinary *apptrecur;
- struct SBinary *TimeZoneStruct;
+ struct Binary_r *apptrecur;
+ struct Binary_r *TimeZoneStruct;
exchange2ical->Keywords = (const struct StringArray_r *) octool_get_propval(aRow, PidNameKeywords);
exchange2ical->method = get_ical_method((const char *) octool_get_propval(aRow, PR_MESSAGE_CLASS_UNICODE));
if (!exchange2ical->method) return -1;
exchange2ical->Recurring = (uint8_t *) octool_get_propval(aRow, PidLidRecurring);
- apptrecur = (struct SBinary *) octool_get_propval(aRow, PidLidAppointmentRecur);
+ apptrecur = (struct Binary_r *) octool_get_propval(aRow, PidLidAppointmentRecur);
exchange2ical->RecurrencePattern = get_RecurrencePattern(mem_ctx, apptrecur);
exchange2ical->TimeZoneDesc = (const char *) octool_get_propval(aRow, PidLidTimeZoneDescription);
- TimeZoneStruct = (struct SBinary *) octool_get_propval(aRow, PidLidTimeZoneStruct);
+ TimeZoneStruct = (struct Binary_r *) octool_get_propval(aRow, PidLidTimeZoneStruct);
exchange2ical->TimeZoneStruct = get_TimeZoneStruct(mem_ctx, TimeZoneStruct);
- exchange2ical->GlobalObjectId = (struct SBinary *) octool_get_propval(aRow, PidLidCleanGlobalObjectId);
+ exchange2ical->GlobalObjectId = (struct Binary_r *) octool_get_propval(aRow, PidLidCleanGlobalObjectId);
exchange2ical->apptStateFlags = (uint32_t *) octool_get_propval(aRow, PidLidAppointmentStateFlags);
exchange2ical->Contacts = (const struct StringArray_r *)octool_get_propval(aRow, PidLidContacts);
exchange2ical->apptStartWhole = (const struct FILETIME *)octool_get_propval(aRow, PidLidAppointmentStartWhole);
const char *Subject;
uint32_t *BusyStatus;
uint32_t *IntendedBusyStatus;
- struct SBinary *GlobalObjectId;
+ struct Binary_r *GlobalObjectId;
const struct FILETIME *AttendeeCriticalChange;
uint32_t *OwnerApptId;
const struct FILETIME *apptReplyTime;
static bool openchangeclient_stream(TALLOC_CTX *mem_ctx, mapi_object_t obj_parent,
mapi_object_t obj_stream, uint32_t mapitag,
- uint32_t access_flags, struct SBinary bin)
+ uint32_t access_flags, struct Binary_r bin)
{
enum MAPISTATUS retval;
DATA_BLOB stream;
set_SPropValue_proptag(&props[3], PR_MSG_EDITOR_FORMAT, (const void *)&editor);
if (strlen(oclient->pr_body) > MAX_READ_SIZE) {
- struct SBinary bin;
+ struct Binary_r bin;
bin.lpb = (uint8_t *)oclient->pr_body;
bin.cb = strlen(oclient->pr_body);
set_SPropValue_proptag(&props[3], PR_MSG_EDITOR_FORMAT, (const void *)&editor);
if (strlen(oclient->pr_html_inline) > MAX_READ_SIZE) {
- struct SBinary bin;
+ struct Binary_r bin;
bin.lpb = (uint8_t *)oclient->pr_html_inline;
bin.cb = strlen(oclient->pr_html_inline);
struct attach {
const char *filename;
- struct SBinary bin;
+ struct Binary_r bin;
int fd;
};
char **mapi_to;
char **mapi_cc;
char **mapi_bcc;
- struct SBinary pr_html;
+ struct Binary_r pr_html;
struct attach *attach;
uint32_t attach_num;
const char *store_folder;