Applied r2971 from trunk
authorWolfgang Wourdeau <wsourdeau@inverse.ca>
Mon, 27 Jun 2011 21:26:39 +0000 (21:26 +0000)
committerWolfgang Wourdeau <wsourdeau@inverse.ca>
Mon, 27 Jun 2011 21:26:39 +0000 (21:26 +0000)
23 files changed:
doc/examples/fetchappointment.c
doc/examples/fetchmail.c
libexchange2ical/exchange2ical.c
libexchange2ical/exchange2ical_property.c
libexchange2ical/ical2exchange.c
libmapi++/property_container.h
libmapi/IMAPIProp.c
libmapi/IMessage.c
libmapi/freebusy.c
libmapi/libmapi.h
libmapi/mapidefs.h
libmapi/mapidump.c
libmapi/nspi.c
libmapi/simple_mapi.c
utils/backup/openchangemapidump.c
utils/exchange2mbox.c
utils/mapitest/mapitest_common.c
utils/mapitest/modules/module_oxcfold.c
utils/mapitest/modules/module_oxcmsg.c
utils/mapitest/modules/module_oxcprpt.c
utils/openchange-tools.c
utils/openchangeclient.c
utils/openchangepfadmin.c

index 38ba30f4e4bc9a4c36a608e022bc0f70f55d1377..4c8d87eba24e73916032fd4fb5d8767cd03dab11 100644 (file)
@@ -75,7 +75,7 @@ int main(int argc, char *argv[])
                        mapi_object_init(&obj_message);
                         retval = OpenMessage(&obj_store, *fid, *mid, &obj_message, 0x0);
                         if (retval != MAPI_E_NOT_FOUND) {
-                                retval = GetPropsAll(&obj_message, &props_all);
+                                retval = GetPropsAll(&obj_message, MAPI_UNICODE, &props_all);
                                 mapidump_appointment(&props_all, NULL);
                                 mapi_object_release(&obj_message);
                         }
index 639b4b2990341282c5d759faa0b7ecc4bd2475c3..17a1650fa9fa4e15b7ef7c468bae0ad175eab85e 100644 (file)
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
                        mapi_object_init(&obj_message);
                         retval = OpenMessage(&obj_store, *fid, *mid, &obj_message, 0x0);
                         if (retval != MAPI_E_NOT_FOUND) {
-                                retval = GetPropsAll(&obj_message, &props_all);
+                                retval = GetPropsAll(&obj_message, MAPI_UNICODE, &props_all);
                                 mapidump_message(&props_all, NULL, &obj_message);
                                 mapi_object_release(&obj_message);
                         }
index 7d24a885531a29b542da8a6c7786fc02ed0d9e56..36b452c164928c335c0256b9ee282d0a08d1a096 100644 (file)
@@ -426,7 +426,7 @@ static uint8_t exchange2ical_exception_from_EmbeddedObj(struct exchange2ical *ex
                                                                          );
                                                                          
                                lpProps = talloc_zero(exchange2ical->mem_ctx, struct SPropValue);
-                               retval = GetProps(&obj_attach, SPropTagArray, &lpProps, &count);
+                               retval = GetProps(&obj_attach, 0, SPropTagArray, &lpProps, &count);
                                MAPIFreeBuffer(SPropTagArray);
                                if (retval != MAPI_E_SUCCESS) {
                                        return 1;
@@ -506,7 +506,7 @@ static uint8_t exchange2ical_exception_from_EmbeddedObj(struct exchange2ical *ex
                                                                  
                                                                  
                
-                                                       retval = GetProps(&exception.obj_message, SPropTagArray, &lpProps, &count);
+                                                       retval = GetProps(&exception.obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
                                                        
                                                        if (retval == MAPI_E_SUCCESS) { 
                                                                aRow2.ulAdrEntryPad = 0;
@@ -559,7 +559,7 @@ static uint8_t exchange2ical_exception_from_EmbeddedObj(struct exchange2ical *ex
                                                                /*has a modified summary*/
                                                                if(dBody && *dBody){
                                                                        SPropTagArray = set_SPropTagArray(exchange2ical->mem_ctx, 0x1, PR_BODY_HTML_UNICODE);
-                                                                       retval = GetProps(&exception.obj_message, SPropTagArray, &lpProps, &count);
+                                                                       retval = GetProps(&exception.obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
                                                                        MAPIFreeBuffer(SPropTagArray);
                                                                        if (retval == MAPI_E_SUCCESS) {
                                                                                aRowT.ulAdrEntryPad = 0;
@@ -696,7 +696,7 @@ icalcomponent * _Exchange2Ical(mapi_object_t *obj_folder, struct exchange2ical_c
                                                                  );
                                                                  
                                                                  
-                               retval = GetProps(&exchange2ical.obj_message, SPropTagArray, &lpProps, &count);
+                               retval = GetProps(&exchange2ical.obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
 
                                MAPIFreeBuffer(SPropTagArray);
        
@@ -728,7 +728,7 @@ icalcomponent * _Exchange2Ical(mapi_object_t *obj_folder, struct exchange2ical_c
                                        
                                        /*Set PR_BODY_HTML for x_alt_desc property*/
                                        SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_BODY_HTML_UNICODE);
-                                       retval = GetProps(&exchange2ical.obj_message, SPropTagArray, &lpProps, &count);
+                                       retval = GetProps(&exchange2ical.obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
                                        MAPIFreeBuffer(SPropTagArray);
                                        if (retval == MAPI_E_SUCCESS) {
                                                aRowT.ulAdrEntryPad = 0;
index a5b3b3899030aa9eb765e741156c874f64d85ffc..bcb3cdb48e0783f0b2d9b0ab5e7dbf051b4da868 100644 (file)
@@ -91,7 +91,7 @@ void ical_property_ATTACH(struct exchange2ical *exchange2ical)
                                                                          );
                                                                          
                                lpProps = talloc_zero(exchange2ical->mem_ctx, struct SPropValue);
-                               retval = GetProps(&obj_attach, SPropTagArray, &lpProps, &count);
+                               retval = GetProps(&obj_attach, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
                                MAPIFreeBuffer(SPropTagArray);
                                if (retval == MAPI_E_SUCCESS) {
 
index 8a7c84a2773e538941595c0899b7964564fcd3a0..2f6d1407a2ef823b4c6197764cb8b787133be86b 100644 (file)
@@ -362,7 +362,7 @@ void _IcalEvent2Exchange(mapi_object_t *obj_folder, icalcomponent *vevent)
        if (retval != MAPI_E_SUCCESS){
                mapi_errstr("CreateMessage", GetLastError());
        } else {
-               retval = SetProps(&obj_message, ical2exchange.lpProps, ical2exchange.cValues);
+               retval = SetProps(&obj_message, 0, ical2exchange.lpProps, ical2exchange.cValues);
                if (retval != MAPI_E_SUCCESS){
                        mapi_errstr("SetProps", GetLastError());
                } else {
index 3f21629f06f9859fae28517f5881aa7b2cc2557f..0a05937b267089f4cc7c67fd5013170223b4a9fa 100644 (file)
@@ -177,7 +177,7 @@ class property_container {
                 */
                uint32_t fetch()
                {
-                       if (GetProps(&m_mapi_object, m_property_tag_array, &m_property_values, &m_cn_vals) != MAPI_E_SUCCESS)
+                       if (GetProps(&m_mapi_object, MAPI_UNICODE, m_property_tag_array, &m_property_values, &m_cn_vals) != MAPI_E_SUCCESS)
                                throw mapi_exception(GetLastError(), "property_container::fetch : GetProps");
 
                        MAPIFreeBuffer(m_property_tag_array);
@@ -190,7 +190,7 @@ class property_container {
                /// \brief Fetches \b ALL properties of the object associated with this container.
                void fetch_all()
                {
-                       if (GetPropsAll(&m_mapi_object, &m_property_value_array) != MAPI_E_SUCCESS)
+                       if (GetPropsAll(&m_mapi_object, MAPI_UNICODE, &m_property_value_array) != MAPI_E_SUCCESS)
                                throw mapi_exception(GetLastError(), "property_container::fetch_all : GetPropsAll");
 
                        // Free property_tag_array in case user used operator<< by mistake.
index ae221e852caa46aacda13f3307e05c4e4d07597c..a2b9a108a7da4de7bc2bf3fff30fc044bd2ff682 100644 (file)
@@ -41,6 +41,8 @@
    named properties.
 
    \param obj the object to get properties on
+   \param flags Flags for behaviour; can be bit-OR of MAPI_UNICODE and
+      MAPI_PROPS_SKIP_NAMEDID_CHECK constants
    \param SPropTagArray an array of MAPI property tags
    \param lpProps the result of the query
    \param PropCount the count of property tags
@@ -57,7 +59,8 @@
 
    \sa SetProps, GetPropList, GetPropsAll, DeleteProps, GetLastError
 */
-_PUBLIC_ enum MAPISTATUS GetProps(mapi_object_t *obj, 
+_PUBLIC_ enum MAPISTATUS GetProps(mapi_object_t *obj,
+                                 uint32_t flags,
                                  struct SPropTagArray *SPropTagArray,
                                  struct SPropValue **lpProps, 
                                  uint32_t *PropCount)
@@ -96,15 +99,16 @@ _PUBLIC_ enum MAPISTATUS GetProps(mapi_object_t *obj,
 
        /* Named property mapping */
        nameid = mapi_nameid_new(mem_ctx);
-       retval = mapi_nameid_lookup_SPropTagArray(nameid, SPropTagArray);
-       if (retval == MAPI_E_SUCCESS) {
-               named = true;
-               SPropTagArray2 = talloc_zero(mem_ctx, struct SPropTagArray);
-               retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray2);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);          
-               mapi_nameid_map_SPropTagArray(nameid, SPropTagArray, SPropTagArray2);
-               MAPIFreeBuffer(SPropTagArray2);
-
+       if (!(flags & MAPI_PROPS_SKIP_NAMEDID_CHECK)) {
+               retval = mapi_nameid_lookup_SPropTagArray(nameid, SPropTagArray);
+               if (retval == MAPI_E_SUCCESS) {
+                       named = true;
+                       SPropTagArray2 = talloc_zero(mem_ctx, struct SPropTagArray);
+                       retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray2);
+                       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);          
+                       mapi_nameid_map_SPropTagArray(nameid, SPropTagArray, SPropTagArray2);
+                       MAPIFreeBuffer(SPropTagArray2);
+               }
        }
        errno = 0;
 
@@ -116,7 +120,7 @@ _PUBLIC_ enum MAPISTATUS GetProps(mapi_object_t *obj,
        /* Fill the GetProps operation */
        request.PropertySizeLimit = 0x0;
        size += sizeof (uint16_t);
-       request.WantUnicode = 0x0;
+       request.WantUnicode = (flags & MAPI_UNICODE) != 0 ? true : 0x0;
        size += sizeof (uint16_t);
        request.prop_count = (uint16_t) SPropTagArray->cValues;
        size += sizeof (uint16_t);
@@ -177,6 +181,7 @@ _PUBLIC_ enum MAPISTATUS GetProps(mapi_object_t *obj,
    This function sets one or more properties on a specified object.
 
    \param obj the object to set properties on
+   \param flags Flags for behaviour; can be MAPI_PROPS_SKIP_NAMEDID_CHECK
    \param lpProps the list of properties to set
    \param PropCount the number of properties
 
@@ -190,7 +195,8 @@ _PUBLIC_ enum MAPISTATUS GetProps(mapi_object_t *obj,
 
    \sa GetProps, GetPropList, GetPropsAll, DeleteProps, GetLastError
 */
-_PUBLIC_ enum MAPISTATUS SetProps(mapi_object_t *obj, 
+_PUBLIC_ enum MAPISTATUS SetProps(mapi_object_t *obj,
+                                 uint32_t flags,
                                  struct SPropValue *lpProps, 
                                  unsigned long PropCount)
 {
@@ -224,14 +230,16 @@ _PUBLIC_ enum MAPISTATUS SetProps(mapi_object_t *obj,
 
        /* Named property mapping */
        nameid = mapi_nameid_new(mem_ctx);
-       retval = mapi_nameid_lookup_SPropValue(nameid, lpProps, PropCount);
-       if (retval == MAPI_E_SUCCESS) {
-               named = true;
-               SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
-               retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-               mapi_nameid_map_SPropValue(nameid, lpProps, PropCount, SPropTagArray);
-               MAPIFreeBuffer(SPropTagArray);
+       if (!(flags & MAPI_PROPS_SKIP_NAMEDID_CHECK)) {
+               retval = mapi_nameid_lookup_SPropValue(nameid, lpProps, PropCount);
+               if (retval == MAPI_E_SUCCESS) {
+                       named = true;
+                       SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
+                       retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray);
+                       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
+                       mapi_nameid_map_SPropValue(nameid, lpProps, PropCount, SPropTagArray);
+                       MAPIFreeBuffer(SPropTagArray);
+               }
        }
        errno = 0;
 
@@ -474,6 +482,7 @@ _PUBLIC_ enum MAPISTATUS GetPropList(mapi_object_t *obj,
    for a given object.
 
    \param obj the object to get the properties for
+   \param flags Flags for behaviour; can be a MAPI_UNICODE constant
    \param properties the properties / values for the object
 
    \return MAPI_E_SUCCESS on success, otherwise MAPI error.
@@ -487,6 +496,7 @@ _PUBLIC_ enum MAPISTATUS GetPropList(mapi_object_t *obj,
    \sa GetProps, GetPropList, GetLastError
 */
 _PUBLIC_ enum MAPISTATUS GetPropsAll(mapi_object_t *obj,
+                                    uint32_t flags,
                                     struct mapi_SPropValue_array *properties)
 {
        TALLOC_CTX              *mem_ctx;
@@ -516,7 +526,7 @@ _PUBLIC_ enum MAPISTATUS GetPropsAll(mapi_object_t *obj,
        /* Fill the GetPropsAll operation */
        request.PropertySizeLimit = 0;
        size += sizeof (uint16_t);
-       request.WantUnicode = 0;
+       request.WantUnicode = (flags & MAPI_UNICODE) != 0 ? true : 0x0;
        size += sizeof (uint16_t);
 
        /* Fill the MAPI_REQ request */
@@ -641,6 +651,7 @@ _PUBLIC_ enum MAPISTATUS DeleteProps(mapi_object_t *obj,
    this function does not result in folder properties being replicated.
 
    \param obj the object to set properties on
+   \param flags Flags for behaviour; can be MAPI_PROPS_SKIP_NAMEDID_CHECK
    \param lpProps the list of properties to set
    \param PropCount the number of properties
 
@@ -656,6 +667,7 @@ _PUBLIC_ enum MAPISTATUS DeleteProps(mapi_object_t *obj,
    \sa SetProps, DeletePropertiesNoReplicate
 */
 _PUBLIC_ enum MAPISTATUS SetPropertiesNoReplicate(mapi_object_t *obj,
+                                                 uint32_t flags,
                                                  struct SPropValue *lpProps, 
                                                  unsigned long PropCount)
 {
@@ -689,14 +701,16 @@ _PUBLIC_ enum MAPISTATUS SetPropertiesNoReplicate(mapi_object_t *obj,
 
        /* Named property mapping */
        nameid = mapi_nameid_new(mem_ctx);
-       retval = mapi_nameid_lookup_SPropValue(nameid, lpProps, PropCount);
-       if (retval == MAPI_E_SUCCESS) {
-               named = true;
-               SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
-               retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray);
-               OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-               mapi_nameid_map_SPropValue(nameid, lpProps, PropCount, SPropTagArray);
-               MAPIFreeBuffer(SPropTagArray);
+       if (!(flags & MAPI_PROPS_SKIP_NAMEDID_CHECK)) {
+               retval = mapi_nameid_lookup_SPropValue(nameid, lpProps, PropCount);
+               if (retval == MAPI_E_SUCCESS) {
+                       named = true;
+                       SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
+                       retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray);
+                       OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
+                       mapi_nameid_map_SPropValue(nameid, lpProps, PropCount, SPropTagArray);
+                       MAPIFreeBuffer(SPropTagArray);
+               }
        }
        errno = 0;
 
index 1c750314b62d9151411c17c5455f9e55218a9256..1599c1bea9896790baecd58e1e7205b2555a858f 100644 (file)
@@ -1571,7 +1571,7 @@ _PUBLIC_ enum MAPISTATUS SetMessageReadFlag(mapi_object_t *obj_folder,
        attach[0].value.l = ATTACH_EMBEDDED_MSG;
        attach[1].ulPropTag = PR_RENDERING_POSITION;
        attach[1].value.l = 0;
-       retval = SetProps(&obj_attach, attach, 2);
+       retval = SetProps(&obj_attach, 0, attach, 2);
        ... check the return value ...
 
         // Initialise the embedded message object
index 5d22f2d6ac98ec575b76f62667adf7ad33096686..87d7455b3e53d725cebb63a2bad22e0ffbe1a0c0 100644 (file)
@@ -224,7 +224,7 @@ _PUBLIC_ enum MAPISTATUS GetUserFreeBusyData(mapi_object_t *obj_store,
                                          PR_FREEBUSY_BUSY_EVENTS,
                                          PR_FREEBUSY_OOF_MONTHS,
                                          PR_FREEBUSY_OOF_EVENTS);
-       retval = GetProps(&obj_message, SPropTagArray, &lpProps, &count);
+       retval = GetProps(&obj_message, 0, SPropTagArray, &lpProps, &count);
        MAPIFreeBuffer(SPropTagArray);
        OPENCHANGE_RETVAL_IF(retval, retval, NULL);
 
index abac0f8a43191d4656f33a67fe289446bf1f3833..3d06305d37a6364a439ff32b39f3d18d60c33ff3 100644 (file)
@@ -327,13 +327,13 @@ enum MAPISTATUS           SetReadFlags(mapi_object_t *, uint8_t, uint16_t, uint64_t *);
 enum MAPISTATUS                HardDeleteMessagesAndSubfolders(mapi_object_t *);
 
 /* The following public definitions come from libmapi/IMAPIProp.c */
-enum MAPISTATUS                GetProps(mapi_object_t *, struct SPropTagArray *, struct SPropValue **, uint32_t *);
-enum MAPISTATUS                SetProps(mapi_object_t *, struct SPropValue *, unsigned long);
+enum MAPISTATUS                GetProps(mapi_object_t *, uint32_t, struct SPropTagArray *, struct SPropValue **, uint32_t *);
+enum MAPISTATUS                SetProps(mapi_object_t *, uint32_t, struct SPropValue *, unsigned long);
 enum MAPISTATUS                SaveChangesAttachment(mapi_object_t *, mapi_object_t *, enum SaveFlags);
 enum MAPISTATUS                GetPropList(mapi_object_t *, struct SPropTagArray *);
-enum MAPISTATUS                GetPropsAll(mapi_object_t *, struct mapi_SPropValue_array *);
+enum MAPISTATUS                GetPropsAll(mapi_object_t *, uint32_t, struct mapi_SPropValue_array *);
 enum MAPISTATUS                DeleteProps(mapi_object_t *, struct SPropTagArray *);
-enum MAPISTATUS                SetPropertiesNoReplicate(mapi_object_t *, struct SPropValue *, unsigned long);
+enum MAPISTATUS                SetPropertiesNoReplicate(mapi_object_t *, uint32_t, struct SPropValue *, unsigned long);
 enum MAPISTATUS                DeletePropertiesNoReplicate(mapi_object_t *, struct SPropTagArray *);
 enum MAPISTATUS                GetNamesFromIDs(mapi_object_t *, enum MAPITAGS, uint16_t *, struct MAPINAMEID **);
 enum MAPISTATUS                GetIDsFromNames(mapi_object_t *, uint16_t, struct MAPINAMEID *, uint32_t, struct SPropTagArray **);
index e4cfa32e0c53b67f13631d7845edcc1dc59a5220..e3df17d6076e866ae6d96ccf139550f18e992f9c 100644 (file)
@@ -27,6 +27,9 @@
 /* UNICODE flags */
 #define        MAPI_UNICODE            0x80000000
 
+/* Other GetProps/SetProps flags */
+#define        MAPI_PROPS_SKIP_NAMEDID_CHECK   0x00000001
+
 /* Property types */
 #define        PT_UNSPECIFIED          0x0
 #define        PT_NULL                 0x1
index f6b27c9e81c30435987451ca67a9c83a222bca0e..6d7f40c746d16e82b8ad69968fa04a1c0936069f 100644 (file)
@@ -400,19 +400,31 @@ _PUBLIC_ void mapidump_message(struct mapi_SPropValue_array *properties, const c
        const uint32_t                  *cp;
        ssize_t                         len;
 
-       msgid = (const char *)find_mapi_SPropValue_data(properties, PR_INTERNET_MESSAGE_ID);
-       subject = (const char *) find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC);
-       body = (const char *) find_mapi_SPropValue_data(properties, PR_BODY);
+       msgid = (const char *)find_mapi_SPropValue_data(properties, PR_INTERNET_MESSAGE_ID_UNICODE);
+       if (!msgid)
+               msgid = (const char *)find_mapi_SPropValue_data(properties, PR_INTERNET_MESSAGE_ID);
+       subject = (const char *) find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC_UNICODE);
+       if (!subject)
+               subject = (const char *) find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC);
+       body = (const char *) find_mapi_SPropValue_data(properties, PR_BODY_UNICODE);
        if (!body) {
-               body = (const char *) find_mapi_SPropValue_data(properties, PR_BODY_UNICODE);
+               body = (const char *) find_mapi_SPropValue_data(properties, PR_BODY);
                if (!body) {
                        html = (const struct SBinary_short *) find_mapi_SPropValue_data(properties, PR_HTML);
                }
        }
-       from = (const char *) find_mapi_SPropValue_data(properties, PR_SENT_REPRESENTING_NAME);
-       to = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_TO);
-       cc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_CC);
-       bcc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_BCC);
+       from = (const char *) find_mapi_SPropValue_data(properties, PR_SENT_REPRESENTING_NAME_UNICODE);
+       if (!from)
+               from = (const char *) find_mapi_SPropValue_data(properties, PR_SENT_REPRESENTING_NAME);
+       to = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_TO_UNICODE);
+       if (!to)
+               to = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_TO);
+       cc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_CC_UNICODE);
+       if (!cc)
+               cc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_CC);
+       bcc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_BCC_UNICODE);
+       if (!bcc)
+               bcc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_BCC);
 
        has_attach = (const uint8_t *)find_mapi_SPropValue_data(properties, PR_HASATTACH);
 
index 9efada9e92f5cf44f913133c0acef09bfcc47188..bb48b47e88915762519d9758f6b69cf91aa0643d 100644 (file)
@@ -933,7 +933,7 @@ _PUBLIC_ enum MAPISTATUS nspi_QueryColumns(struct nspi_context *nspi_ctx,
 
        r.in.handle = &nspi_ctx->handle;
        r.in.Reserved = 0x0;
-       r.in.dwFlags = (WantUnicode == true) ? NspiUnicodeProptypes : 0x0;
+       r.in.dwFlags = (WantUnicode != false) ? NspiUnicodeProptypes : 0x0;
        
        r.out.ppColumns = ppColumns;
 
index 9ab44ddd85115ae1db13092ac0e48c4a52bb484d..369097cf3137738e43dbcc98d8767ae5fcbf5699 100644 (file)
@@ -141,7 +141,7 @@ static enum MAPISTATUS CacheDefaultFolders(mapi_object_t *obj_store)
                                          PR_IPM_TASK_ENTRYID,
                                          PR_IPM_DRAFTS_ENTRYID);
        
-       retval = GetProps(&obj_inbox, SPropTagArray, &lpProps, &count);
+       retval = GetProps(&obj_inbox, 0, SPropTagArray, &lpProps, &count);
        MAPIFreeBuffer(SPropTagArray);
        OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
        
@@ -436,7 +436,7 @@ _PUBLIC_ enum MAPISTATUS GetFolderItemsCount(mapi_object_t *obj_folder,
                                          PR_CONTENT_UNREAD,
                                          PR_CONTENT_COUNT);
 
-       retval = GetProps(obj_folder, SPropTagArray, &lpProps, &count);
+       retval = GetProps(obj_folder, 0, SPropTagArray, &lpProps, &count);
        MAPIFreeBuffer(SPropTagArray);
        OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
 
@@ -812,7 +812,7 @@ _PUBLIC_ enum MAPISTATUS GetBestBody(mapi_object_t *obj_message,
                                          PR_RTF_COMPRESSED,
                                          PR_HTML,
                                          PR_RTF_IN_SYNC);
-       retval = GetProps(obj_message, SPropTagArray, &lpProps, &count);
+       retval = GetProps(obj_message, 0, SPropTagArray, &lpProps, &count);
        MAPIFreeBuffer(SPropTagArray);
        if (retval != MAPI_E_SUCCESS) {
                *format = 0;
index 7eb55eb2bfd27e66300070fad09829a4f79f531c..d7ae4e273545ebb8f6f151bafc90626e9676b753 100644 (file)
@@ -138,7 +138,7 @@ static enum MAPISTATUS mapidump_walk_attachment(TALLOC_CTX *mem_ctx,
                        mapi_object_init(&obj_attach);
                        retval = OpenAttach(obj_message, *attach_num, &obj_attach);
                        if (retval == MAPI_E_SUCCESS) {
-                               retval = GetPropsAll(&obj_attach, &props);
+                               retval = GetPropsAll(&obj_attach, MAPI_UNICODE, &props);
                                if (retval == MAPI_E_SUCCESS) {
                                        /* extract unique identifier from PR_RECORD_KEY */
                                        sbin = (const struct SBinary_short *)find_mapi_SPropValue_data(&props, PR_RECORD_KEY);
@@ -206,7 +206,7 @@ static enum MAPISTATUS mapidump_walk_content(TALLOC_CTX *mem_ctx,
                        /* Open Message */
                        retval = OpenMessage(obj_folder, *fid, *mid, &obj_message, 0);
                        if (GetLastError() == MAPI_E_SUCCESS) {
-                               retval = GetPropsAll(&obj_message, &props);
+                               retval = GetPropsAll(&obj_message, MAPI_UNICODE, &props);
                                if (GetLastError() == MAPI_E_SUCCESS) {
                                        /* extract unique identifier from PR_SOURCE_KEY */
                                        sbin = (const struct SBinary_short *)find_mapi_SPropValue_data(&props, PR_SOURCE_KEY);
@@ -266,7 +266,7 @@ static enum MAPISTATUS mapidump_walk_container(TALLOC_CTX *mem_ctx,
        MAPI_RETVAL_IF(retval, GetLastError(), NULL);
 
        /* Retrieve all its properties */
-       retval = GetPropsAll(&obj_folder, &props);
+       retval = GetPropsAll(&obj_folder, MAPI_UNICODE, &props);
        MAPI_RETVAL_IF(retval, GetLastError(), NULL);
        child_content = (const uint32_t *)find_mapi_SPropValue_data(&props, PR_CONTENT_COUNT);
        child_folder = (const uint32_t *)find_mapi_SPropValue_data(&props, PR_FOLDER_CHILD_COUNT);
index abe8a1f8ab660ada21776dbfe2b21479d5a448f8..d9e0252ebd8edde7e81fdc6f716e1552ce73b5a7 100644 (file)
@@ -838,7 +838,7 @@ old_code:
                                                                          PR_ATTACH_MIME_TAG,
                                                                          PR_ATTACH_METHOD);
                                        lpProps = talloc_zero(mem_ctx, struct SPropValue);
-                                       retval = GetProps(&obj_attach, SPropTagArray, &lpProps, &count);
+                                       retval = GetProps(&obj_attach, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
                                        MAPIFreeBuffer(SPropTagArray);
                                        if (retval == MAPI_E_SUCCESS) {
                                                uint32_t *mp, method = -1;
@@ -929,7 +929,7 @@ old_code:
                                                                                        PR_DISPLAY_BCC_UNICODE,
                                                                                        PR_HASATTACH,
                                                                                        PR_TRANSPORT_MESSAGE_HEADERS);
-                                                       retval = GetProps(&obj_embeddedmsg, embTagArray,
+                                                       retval = GetProps(&obj_embeddedmsg, MAPI_UNICODE, embTagArray,
                                                                        &embProps, &emb_count);
                                                        MAPIFreeBuffer(embTagArray);
 
@@ -1201,7 +1201,7 @@ int main(int argc, const char *argv[])
                                                                  PR_NORMALIZED_SUBJECT_UNICODE,
                                                                  PR_SUBJECT,
                                                                  PR_SUBJECT_UNICODE);
-                               retval = GetProps(&obj_message, SPropTagArray, &lpProps, &count);
+                               retval = GetProps(&obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
                                MAPIFreeBuffer(SPropTagArray);
                                if (retval != MAPI_E_SUCCESS) {
                                        fprintf(stderr, "Badness getting row %d attrs\n", i);
index 847138d29140e3346c5b172d282018d05ddf80e4..f006cf2a8b36a451949bcedd63417d3bb91517d6 100644 (file)
@@ -291,7 +291,7 @@ _PUBLIC_ bool mapitest_common_message_fill(struct mapitest *mt,
        format = EDITOR_FORMAT_PLAINTEXT;
        set_SPropValue_proptag(&lpProps[3], PR_MSG_EDITOR_FORMAT, (const void *)&format);
 
-       retval = SetProps(obj_message, lpProps, 4);
+       retval = SetProps(obj_message, 0, lpProps, 4);
        if (retval != MAPI_E_SUCCESS) {
                mapitest_print_retval(mt, "(Common) SetProps");
                return false;
@@ -400,7 +400,7 @@ _PUBLIC_ bool mapitest_common_create_filled_test_folder(struct mapitest *mt)
                set_SPropValue_proptag(&lpProp[1], PR_BODY, (const void *)body);
                format = EDITOR_FORMAT_PLAINTEXT;
                set_SPropValue_proptag(&lpProp[2], PR_MSG_EDITOR_FORMAT, (const void *)&format);
-               retval = SetProps(&(context->obj_test_msg[i]), lpProp, 3);
+               retval = SetProps(&(context->obj_test_msg[i]), 0, lpProp, 3);
                MAPIFreeBuffer((void *)from);
                MAPIFreeBuffer((void *)body);
                if (retval != MAPI_E_SUCCESS) {
@@ -431,7 +431,7 @@ _PUBLIC_ bool mapitest_common_create_filled_test_folder(struct mapitest *mt)
                set_SPropValue_proptag(&lpProp[1], PR_BODY, (const void *)body);
                format = EDITOR_FORMAT_PLAINTEXT;
                set_SPropValue_proptag(&lpProp[2], PR_MSG_EDITOR_FORMAT, (const void *)&format);
-               retval = SetProps(&(context->obj_test_msg[i]), lpProp, 3);
+               retval = SetProps(&(context->obj_test_msg[i]), 0, lpProp, 3);
                MAPIFreeBuffer((void *)from);
                MAPIFreeBuffer((void *)body);
                if (retval != MAPI_E_SUCCESS) {
index 4a66e7732b74f46ae4ce67892b83b9140c59f1a4..7459370c904be499fe9e79b05ae20ade8ab03a8a 100644 (file)
@@ -353,7 +353,7 @@ _PUBLIC_ bool mapitest_oxcfold_CreateFolder(struct mapitest *mt)
                }
                /* Step 4.2. Set its container class */
                set_SPropValue_proptag(&lpProp[0], PR_CONTAINER_CLASS, (const void *) subfolders[i].class);
-               retval = SetProps(&obj_child, lpProp, 1);
+               retval = SetProps(&obj_child, 0, lpProp, 1);
                mapitest_print_retval_fmt(mt, "SetProps", "(%s)", subfolders[i].name);          
                if (retval != MAPI_E_SUCCESS) {
                        mapitest_deindent();
@@ -751,7 +751,7 @@ _PUBLIC_ bool mapitest_oxcfold_SetSearchCriteria(struct mapitest *mt)
        /* Step 5. Set properties on this search folder */
        lpProps[0].ulPropTag = PR_CONTAINER_CLASS;
        lpProps[0].value.lpszA = IPF_NOTE;
-       retval = SetProps(&obj_searchdir, lpProps, 1);
+       retval = SetProps(&obj_searchdir, 0, lpProps, 1);
        mapitest_print_retval(mt, "SetProps");
        if (GetLastError() != MAPI_E_SUCCESS) {
                ret = false;
@@ -863,7 +863,7 @@ _PUBLIC_ bool mapitest_oxcfold_GetSearchCriteria(struct mapitest *mt)
        /* Step 5. Set properties on this search folder */
        lpProps[0].ulPropTag = PR_CONTAINER_CLASS;
        lpProps[0].value.lpszA = IPF_NOTE;
-       retval = SetProps(&obj_searchdir, lpProps, 1);
+       retval = SetProps(&obj_searchdir, 0, lpProps, 1);
        mapitest_print_retval(mt, "SetProps");
        if (GetLastError() != MAPI_E_SUCCESS) {
                ret = false;
index f5378dbf24ff50cdf32f317348a693facb9dd084..a8a8f2215944aa68a28b5959386bd8b4b979ff07 100644 (file)
@@ -151,7 +151,7 @@ _PUBLIC_ bool mapitest_oxcmsg_SetMessageReadFlag(struct mapitest *mt)
        ret = true;
 
        /* 1. Retrieve and Save the original PR_MESSAGE_FLAGS value */
-       retval = GetProps(&obj_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_message, 0, SPropTagArray, &lpProps, &cValues);
        if (GetLastError() != MAPI_E_SUCCESS) {
                return false;
        }
@@ -166,7 +166,7 @@ _PUBLIC_ bool mapitest_oxcmsg_SetMessageReadFlag(struct mapitest *mt)
        mapitest_print_retval_fmt(mt, "SetMessageReadFlag", "(%s)", "MSGFLAG_READ");
 
        /* Check if the operation was successful */
-       retval = GetProps(&obj_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_message, 0, SPropTagArray, &lpProps, &cValues);
        mapitest_print_retval(mt, "GetProps");
        if (GetLastError() != MAPI_E_SUCCESS) {
                return false;
@@ -186,7 +186,7 @@ _PUBLIC_ bool mapitest_oxcmsg_SetMessageReadFlag(struct mapitest *mt)
        mapitest_print_retval_fmt(mt, "SetMessageReadFlag", "(%s)", "MSGFLAG_SUBMIT");
        
        /* Check if the operation was successful */
-       retval = GetProps(&obj_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_message, 0, SPropTagArray, &lpProps, &cValues);
        if (GetLastError() != MAPI_E_SUCCESS) {
                return false;
        }
@@ -1266,7 +1266,7 @@ _PUBLIC_ bool mapitest_oxcmsg_OpenEmbeddedMessage(struct mapitest *mt)
        attach[0].value.l = ATTACH_EMBEDDED_MSG;
        attach[1].ulPropTag = PR_RENDERING_POSITION;
        attach[1].value.l = 0;
-       retval = SetProps(&obj_attach, attach, 2);
+       retval = SetProps(&obj_attach, 0, attach, 2);
        mapitest_print(mt, "* %-35s: 0x%.8x\n", "SetProps", retval);
        if (retval != MAPI_E_SUCCESS) {
                mapi_object_release(&obj_attach);
@@ -1479,7 +1479,7 @@ _PUBLIC_ bool mapitest_oxcmsg_GetValidAttachments(struct mapitest *mt)
        attach[1].value.l = 0;
        attach[2].ulPropTag = PR_ATTACH_FILENAME;
        attach[2].value.lpszA = "Attachment 0";
-       retval = SetProps(&obj_attach0, attach, 3);
+       retval = SetProps(&obj_attach0, 0, attach, 3);
        mapitest_print_retval_clean(mt, "SetProps", retval);
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -1508,7 +1508,7 @@ _PUBLIC_ bool mapitest_oxcmsg_GetValidAttachments(struct mapitest *mt)
        attach[1].value.l = 0;
        attach[2].ulPropTag = PR_ATTACH_FILENAME;
        attach[2].value.lpszA = "Attachment 1";
-       retval = SetProps(&obj_attach1, attach, 3);
+       retval = SetProps(&obj_attach1, 0, attach, 3);
        mapitest_print_retval_clean(mt, "SetProps", retval);
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
index 5d220cec35d95e9374bbfa543ed666ec6414b7b2..2e7f1c8b26808c38f01010f0eee2eda7bd7b7d82 100644 (file)
@@ -67,7 +67,7 @@ _PUBLIC_ bool mapitest_oxcprpt_GetProps(struct mapitest *mt)
        }
 
        /* Step 3. Call the GetProps operation */
-       retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_store, 0, SPropTagArray, &lpProps, &cValues);
        mapitest_print_retval(mt, "GetProps");
        if (retval != MAPI_E_SUCCESS) {
                MAPIFreeBuffer(SPropTagArray);
@@ -108,7 +108,7 @@ _PUBLIC_ bool mapitest_oxcprpt_GetPropsAll(struct mapitest *mt)
        }
 
        /* Step 2. GetPropsAll operation */
-       retval = GetPropsAll(&obj_store, &properties_array);
+       retval = GetPropsAll(&obj_store, 0, &properties_array);
        mapitest_print_retval(mt, "GetPropsAll");
        if (retval != MAPI_E_SUCCESS) {
                return false;
@@ -197,7 +197,7 @@ _PUBLIC_ bool mapitest_oxcprpt_SetProps(struct mapitest *mt)
 
        /* Step 2: GetProps, retrieve mailbox name */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DISPLAY_NAME);
-       retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_store, 0, SPropTagArray, &lpProps, &cValues);
        mapitest_print_retval_step_fmt(mt, "2.", "GetProps", "(%s)", "Retrieve the mailbox name");
        if (retval != MAPI_E_SUCCESS) {
                return false;
@@ -217,12 +217,12 @@ _PUBLIC_ bool mapitest_oxcprpt_SetProps(struct mapitest *mt)
        new_mailbox = talloc_asprintf(mt->mem_ctx, "%s [MAPITEST]", mailbox);
        set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, 
                               (const void *) new_mailbox);
-       retval = SetProps(&obj_store, lpProp, cValues);
+       retval = SetProps(&obj_store, 0, lpProp, cValues);
        mapitest_print_retval_step_fmt(mt, "2.1.", "SetProps", "(%s)", "NEW mailbox name");
 
        /* Step 2.2: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DISPLAY_NAME);
-       retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_store, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(new_mailbox, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -236,12 +236,12 @@ _PUBLIC_ bool mapitest_oxcprpt_SetProps(struct mapitest *mt)
        /* Step 3.1: Reset mailbox to its original value */
        cValues = 1;
        set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)mailbox);
-       retval = SetProps(&obj_store, lpProp, cValues);
+       retval = SetProps(&obj_store, 0, lpProp, cValues);
        mapitest_print_retval_step_fmt(mt, "3.1.", "SetProps", "(%s)", "OLD mailbox name");
        
        /* Step 3.2: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DISPLAY_NAME);
-       retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_store, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(mailbox, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -330,7 +330,7 @@ _PUBLIC_ bool mapitest_oxcprpt_DeleteProps(struct mapitest *mt)
        subject = talloc_asprintf(mt->mem_ctx, "Reference: %s", "subject");
        set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
        set_SPropValue_proptag(&lpProp[1], PR_CONVERSATION_TOPIC, (const void *)subject);
-       retval = SetProps(&obj_ref_message, lpProp, 2);
+       retval = SetProps(&obj_ref_message, 0, lpProp, 2);
        mapitest_print_retval_step_fmt(mt, "3.2.", "SetProps", "(%s)", "Set email properties");
        if (retval != MAPI_E_SUCCESS) {
                return false;
@@ -338,7 +338,7 @@ _PUBLIC_ bool mapitest_oxcprpt_DeleteProps(struct mapitest *mt)
 
        /* Step 4: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -368,7 +368,7 @@ _PUBLIC_ bool mapitest_oxcprpt_DeleteProps(struct mapitest *mt)
 
        /* Step 6. Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (get_SPropValue(lpProps, PR_CONVERSATION_TOPIC) == NULL) {
                mapitest_print(mt, "* Step 5.1. - GetProps verifier [SUCCESS]\n");
@@ -477,7 +477,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
        subject = talloc_asprintf(mt->mem_ctx, "Reference: %s", "subject");
        set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
        set_SPropValue_proptag(&lpProp[1], PR_CONVERSATION_TOPIC, (const void *)subject);
-       retval = SetProps(&obj_ref_message, lpProp, 2);
+       retval = SetProps(&obj_ref_message, 0, lpProp, 2);
        mapitest_print_retval_step_fmt(mt, "3.2.", "SetProps", "(%s)", "Set email properties");
        if (retval != MAPI_E_SUCCESS) {
                return false;
@@ -485,7 +485,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
 
        /* Step 4: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -522,7 +522,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
        targ_dept = talloc_asprintf(mt->mem_ctx, "Target: %s", "department");
        set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)targ_name);
        set_SPropValue_proptag(&lpProp[1], PR_DEPARTMENT_NAME, (const void *)targ_dept);
-       retval = SetProps(&obj_target_message, lpProp, 2);
+       retval = SetProps(&obj_target_message, 0, lpProp, 2);
        mapitest_print_retval_step_fmt(mt, "5.2.", "SetProps", "(%s)", "set properties on target email");
        if (retval != MAPI_E_SUCCESS) {
                return false;
@@ -530,7 +530,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
 
        /* Step 6: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(targ_name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -566,7 +566,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
 
        /* Step 8: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -587,7 +587,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
                }
        }
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        /* this one shouldn't be overwritten */
        if (lpProps[0].value.lpszA) {
@@ -633,7 +633,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
 
        /* Step 10: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -654,7 +654,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
                }
        }
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        /* this one should now be overwritten */
        if (lpProps[0].value.lpszA) {
@@ -707,7 +707,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
 
        /* Step 12: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (cValues == 2) {
                mapitest_print(mt, "* Step 12A - Properties removed [SUCCESS]\n");
@@ -715,7 +715,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyProps(struct mapitest *mt)
                mapitest_print(mt, "* Step 12A - Properties removed [FAILURE]\n");
        }
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -877,7 +877,7 @@ _PUBLIC_ bool mapitest_oxcprpt_Stream(struct mapitest *mt)
        attach[2].ulPropTag = PR_ATTACH_FILENAME;
        attach[2].value.lpszA = MT_MAIL_ATTACH;
 
-       retval = SetProps(&obj_attach, attach, 3);
+       retval = SetProps(&obj_attach, 0, attach, 3);
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
        }
@@ -1168,7 +1168,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyToStream(struct mapitest *mt)
        attach[2].ulPropTag = PR_ATTACH_FILENAME;
        attach[2].value.lpszA = MT_MAIL_ATTACH;
 
-       retval = SetProps(&obj_attach, attach, 3);
+       retval = SetProps(&obj_attach, 0, attach, 3);
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
        }
@@ -1234,7 +1234,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyToStream(struct mapitest *mt)
        attach[2].ulPropTag = PR_ATTACH_FILENAME;
        attach[2].value.lpszA = MT_MAIL_ATTACH2;
 
-       retval = SetProps(&obj_attach2, attach, 3);
+       retval = SetProps(&obj_attach2, 0, attach, 3);
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
        }
@@ -1443,7 +1443,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
        }
        lpProp[0].ulPropTag = PR_CONTAINER_CLASS;
        lpProp[0].value.lpszA = "IPF.Note";
-       retval = SetProps(&obj_ref_folder, lpProp, 1);
+       retval = SetProps(&obj_ref_folder, 0, lpProp, 1);
        mapitest_print_retval(mt, "SetProps");
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -1470,7 +1470,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
        set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
        set_SPropValue_proptag(&lpProp[1], PR_SUBJECT, (const void *)subject);
        set_SPropValue_proptag(&lpProp[2], PR_DEPARTMENT_NAME, (const void *)dept);
-       retval = SetProps(&obj_ref_message, lpProp, 3);
+       retval = SetProps(&obj_ref_message, 0, lpProp, 3);
        mapitest_print_retval(mt, "SetProps");
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -1480,7 +1480,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
        /* Step 4: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT,
                                          PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -1540,7 +1540,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
        targ_dept = talloc_asprintf(mt->mem_ctx, "Target: %s", "department");
        set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)targ_name);
        set_SPropValue_proptag(&lpProp[1], PR_DEPARTMENT_NAME, (const void *)targ_dept);
-       retval = SetProps(&obj_target_message, lpProp, 2);
+       retval = SetProps(&obj_target_message, 0, lpProp, 2);
        mapitest_print_retval_clean(mt, "SetProps", retval);
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -1549,7 +1549,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
 
        /* Step 6: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(targ_name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -1591,7 +1591,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
 
        /* Step 8: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_SUBJECT);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -1616,7 +1616,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
                }
        }
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        /* this one shouldn't be overwritten */
        if (lpProps[0].value.lpszA) {
@@ -1668,7 +1668,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
 
        /* Step 10: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_SUBJECT);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -1693,7 +1693,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
                }
        }
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        /* this one should now be overwritten */
        if (lpProps[0].value.lpszA) {
@@ -1746,7 +1746,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
 
        /* Step 12: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_SUBJECT);
-       retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (cValues == 2) {
                mapitest_print(mt, "* Step 12A - Properties removed [SUCCESS]\n");
@@ -1756,7 +1756,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
                goto cleanup;
        }
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT, PR_DEPARTMENT_NAME);
-       retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -1805,7 +1805,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
        lpProp[1].value.l = 0;
        lpProp[2].ulPropTag = PR_ATTACH_FILENAME;
        lpProp[2].value.lpszA = MT_MAIL_ATTACH;
-       retval = SetProps(&obj_ref_attach, lpProp, 3);
+       retval = SetProps(&obj_ref_attach, 0, lpProp, 3);
        mapitest_print_retval(mt, "SetProps");
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -1827,7 +1827,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
        lpProp[1].value.l = 0;
        lpProp[2].ulPropTag = PR_ATTACH_FILENAME;
        lpProp[2].value.lpszA = MT_MAIL_ATTACH2;
-       retval = SetProps(&obj_targ_attach, lpProp, 3);
+       retval = SetProps(&obj_targ_attach, 0, lpProp, 3);
        mapitest_print_retval(mt, "SetProps");
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -1851,7 +1851,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
 
        /* Step 16: Check properties on both attachments are correct */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_ATTACH_FILENAME);
-       retval = GetProps(&obj_ref_attach, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_attach, 0, SPropTagArray, &lpProps, &cValues);
        mapitest_print_retval(mt, "GetProps");
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -1870,7 +1870,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
                }
        }       
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_ATTACH_FILENAME);
-       retval = GetProps(&obj_targ_attach, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_targ_attach, 0, SPropTagArray, &lpProps, &cValues);
        mapitest_print_retval(mt, "GetProps");
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -1899,7 +1899,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
        }
        lpProp[0].ulPropTag = PR_CONTAINER_CLASS;
        lpProp[0].value.lpszA = "IPF.Journal";
-       retval = SetProps(&obj_targ_folder, lpProp, 1);
+       retval = SetProps(&obj_targ_folder, 0, lpProp, 1);
        mapitest_print_retval(mt, "SetProps");
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -1919,7 +1919,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
 
        /* Check that the properties on both folders are correct */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONTAINER_CLASS);
-       retval = GetProps(&obj_ref_folder, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_folder, 0, SPropTagArray, &lpProps, &cValues);
        mapitest_print_retval(mt, "GetProps");
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -1949,7 +1949,7 @@ _PUBLIC_ bool mapitest_oxcprpt_CopyTo(struct mapitest *mt)
                }
        }
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONTAINER_CLASS);
-       retval = GetProps(&obj_targ_folder, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_targ_folder, 0, SPropTagArray, &lpProps, &cValues);
        mapitest_print_retval(mt, "GetProps");
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -2467,7 +2467,7 @@ _PUBLIC_ bool mapitest_oxcprpt_NoReplicate(struct mapitest *mt)
        comment = talloc_asprintf(mt->mem_ctx, "Reference: %s", "the folder comment");
        set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
        set_SPropValue_proptag(&lpProp[1], PR_COMMENT, (const void *)comment);
-       retval = SetPropertiesNoReplicate(&obj_ref_folder, lpProp, 2);
+       retval = SetPropertiesNoReplicate(&obj_ref_folder, 0, lpProp, 2);
        mapitest_print_retval_step_fmt(mt, "3.", "SetProps", "(%s)", "Set folder properties");
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
@@ -2476,7 +2476,7 @@ _PUBLIC_ bool mapitest_oxcprpt_NoReplicate(struct mapitest *mt)
 
        /* Step 4: Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_COMMENT);
-       retval = GetProps(&obj_ref_folder, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_folder, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (lpProps[0].value.lpszA) {
                if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -2509,7 +2509,7 @@ _PUBLIC_ bool mapitest_oxcprpt_NoReplicate(struct mapitest *mt)
 
        /* Step 6. Double check with GetProps */
        SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_COMMENT);
-       retval = GetProps(&obj_ref_folder, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(&obj_ref_folder, 0, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (get_SPropValue(lpProps, PR_COMMENT) == NULL) {
                mapitest_print(mt, "* Step 6.1. - GetProps verifier [SUCCESS]\n");
@@ -2622,7 +2622,7 @@ _PUBLIC_ bool mapitest_oxcprpt_WriteAndCommitStream(struct mapitest *mt)
        attach[2].ulPropTag = PR_ATTACH_FILENAME;
        attach[2].value.lpszA = MT_MAIL_ATTACH;
 
-       retval = SetProps(&obj_attach, attach, 3);
+       retval = SetProps(&obj_attach, 0, attach, 3);
        if (retval != MAPI_E_SUCCESS) {
                ret = false;
        }
index c4b1ce6567278b0fc874a04d5531f6bc69512be4..395d39473212da527ddaca4421c47ef07fa7715e 100644 (file)
@@ -219,7 +219,7 @@ _PUBLIC_ enum MAPISTATUS octool_message(TALLOC_CTX *mem_ctx,
                                          PR_HASATTACH,
                                          PR_MESSAGE_CODEPAGE);
        lpProps = talloc_zero(mem_ctx, struct SPropValue);
-       retval = GetProps(obj_message, SPropTagArray, &lpProps, &count);
+       retval = GetProps(obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
        MAPIFreeBuffer(SPropTagArray);
        MAPI_RETVAL_IF(retval, retval, NULL);
 
index da53eca380effb3cb4b91332ba6c84eaea316ce1..652db82495a23014a4cd37b5a50ed3c379132788 100644 (file)
@@ -293,14 +293,14 @@ static char *build_uniqueID(TALLOC_CTX *mem_ctx, mapi_object_t *obj_folder,
 
        /* retrieve the folder ID */
        SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_FID);
-       retval = GetProps(obj_folder, SPropTagArray, &lpProps, &count);
+       retval = GetProps(obj_folder, 0, SPropTagArray, &lpProps, &count);
        MAPIFreeBuffer(SPropTagArray);
        if (GetLastError() != MAPI_E_SUCCESS) return NULL;
        fid = (const uint64_t *)get_SPropValue_data(lpProps);
 
        /* retrieve the message ID */
        SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_MID);
-       retval = GetProps(obj_message, SPropTagArray, &lpProps, &count);
+       retval = GetProps(obj_message, 0, SPropTagArray, &lpProps, &count);
        MAPIFreeBuffer(SPropTagArray);
        if (GetLastError() != MAPI_E_SUCCESS) return NULL;
        mid = (const uint64_t *)get_SPropValue_data(lpProps);
@@ -454,7 +454,7 @@ static enum MAPISTATUS openchangeclient_fetchmail(mapi_object_t *obj_store,
                                        
                                        SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_HASATTACH);
                                        lpProps = talloc_zero(mem_ctx, struct SPropValue);
-                                       retval = GetProps(&obj_message, SPropTagArray, &lpProps, &count);
+                                       retval = GetProps(&obj_message, 0, SPropTagArray, &lpProps, &count);
                                        MAPIFreeBuffer(SPropTagArray);
                                        if (retval != MAPI_E_SUCCESS) return retval;
                                        
@@ -492,7 +492,7 @@ static enum MAPISTATUS openchangeclient_fetchmail(mapi_object_t *obj_store,
                                                                                                          PR_ATTACH_SIZE,
                                                                                                          PR_ATTACH_CONTENT_ID);
                                                                        lpProps2 = talloc_zero(mem_ctx, struct SPropValue);
-                                                                       retval = GetProps(&obj_attach, SPropTagArray, &lpProps2, &count2);
+                                                                       retval = GetProps(&obj_attach, MAPI_UNICODE, SPropTagArray, &lpProps2, &count2);
                                                                        MAPIFreeBuffer(SPropTagArray);
                                                                        if (retval != MAPI_E_SUCCESS) return retval;
                                                                        
@@ -888,7 +888,7 @@ static enum MAPISTATUS openchangeclient_sendmail(TALLOC_CTX *mem_ctx,
                }
        }
 
-       retval = SetProps(&obj_message, props, prop_count);
+       retval = SetProps(&obj_message, 0, props, prop_count);
        if (retval != MAPI_E_SUCCESS) return retval;
 
        /* attachment related code */
@@ -918,7 +918,7 @@ static enum MAPISTATUS openchangeclient_sendmail(TALLOC_CTX *mem_ctx,
                        count_props_attach = 4;
 
                        /* SetProps */
-                       retval = SetProps(&obj_attach, props_attach, count_props_attach);
+                       retval = SetProps(&obj_attach, 0, props_attach, count_props_attach);
                        if (retval != MAPI_E_SUCCESS) return retval;
 
                        /* Stream operations */
@@ -1161,7 +1161,7 @@ static enum MAPISTATUS appointment_SetProps(TALLOC_CTX *mem_ctx,
        flag = (oclient->private == true) ? 2 : 0;
        lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_SENSITIVITY, (const void *)&flag);
        
-       retval = SetProps(obj_message, lpProps, cValues);
+       retval = SetProps(obj_message, 0, lpProps, cValues);
        MAPIFreeBuffer(lpProps);
        MAPI_RETVAL_IF(retval, retval, NULL);
 
@@ -1266,7 +1266,7 @@ static enum MAPISTATUS contact_SetProps(TALLOC_CTX *mem_ctx,
        if (!oclient->update) {
                lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_MESSAGE_CLASS_UNICODE, (const void *)"IPM.Contact");
        }
-       retval = SetProps(obj_message, lpProps, cValues);
+       retval = SetProps(obj_message, 0, lpProps, cValues);
        MAPIFreeBuffer(SPropTagArray);
        MAPIFreeBuffer(lpProps);
        MAPI_RETVAL_IF(retval, retval, NULL);
@@ -1386,7 +1386,7 @@ static enum MAPISTATUS task_SetProps(TALLOC_CTX *mem_ctx,
                }
        }
 
-       retval = SetProps(obj_message, lpProps, cValues);
+       retval = SetProps(obj_message, 0, lpProps, cValues);
        MAPIFreeBuffer(lpProps);
        MAPI_RETVAL_IF(retval, retval, NULL);
 
@@ -1495,7 +1495,7 @@ static enum MAPISTATUS note_SetProps(TALLOC_CTX *mem_ctx,
        }
 
        
-       retval = SetProps(obj_message, lpProps, cValues);
+       retval = SetProps(obj_message, 0, lpProps, cValues);
        MAPIFreeBuffer(lpProps);
        MAPI_RETVAL_IF(retval, retval, NULL);
        
@@ -1562,7 +1562,7 @@ static const char *get_container_class(TALLOC_CTX *mem_ctx, mapi_object_t *paren
        if (retval != MAPI_E_SUCCESS) return false;
 
        SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_CONTAINER_CLASS);
-       retval = GetProps(&obj_folder, SPropTagArray, &lpProps, &count);
+       retval = GetProps(&obj_folder, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
        MAPIFreeBuffer(SPropTagArray);
        mapi_object_release(&obj_folder);
        if ((lpProps[0].ulPropTag != PR_CONTAINER_CLASS) || (retval != MAPI_E_SUCCESS)) {
@@ -1711,7 +1711,7 @@ static bool openchangeclient_mailbox(TALLOC_CTX *mem_ctx,
 
        /* Retrieve the mailbox folder name */
        SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_DISPLAY_NAME_UNICODE);
-       retval = GetProps(obj_store, SPropTagArray, &lpProps, &cValues);
+       retval = GetProps(obj_store, MAPI_UNICODE, SPropTagArray, &lpProps, &cValues);
        MAPIFreeBuffer(SPropTagArray);
        if (retval != MAPI_E_SUCCESS) return false;
 
@@ -1821,7 +1821,7 @@ static bool openchangeclient_fetchitems(TALLOC_CTX *mem_ctx, mapi_object_t *obj_
                                if (oclient->summary) {
                                        mapidump_message_summary(&obj_message);
                                } else {
-                                       retval = GetPropsAll(&obj_message, &properties_array);
+                                       retval = GetPropsAll(&obj_message, MAPI_UNICODE, &properties_array);
                                        if (retval == MAPI_E_SUCCESS) {
                                                id = talloc_asprintf(mem_ctx, ": %"PRIX64"/%"PRIX64,
                                                                     SRowSet.aRow[i].lpProps[0].value.d,
@@ -2152,7 +2152,7 @@ static enum MAPISTATUS openchangeclient_findmail(mapi_object_t *obj_store,
                                                             SRowSet.aRow[i].lpProps[1].value.d,
                                                             &obj_message, 0);
                                        if (GetLastError() == MAPI_E_SUCCESS) {
-                                               retval = GetPropsAll(&obj_message, &properties_array);
+                                               retval = GetPropsAll(&obj_message, MAPI_UNICODE, &properties_array);
                                                if (retval != MAPI_E_SUCCESS) return retval;
                                                id = talloc_asprintf(mem_ctx, ": %"PRIX64"/%"PRIX64,
                                                                     SRowSet.aRow[i].lpProps[0].value.d,
@@ -2617,7 +2617,7 @@ static bool openchangeclient_ocpf_sender(TALLOC_CTX *mem_ctx, mapi_object_t *obj
        /* Step7. Set message properties */
        lpProps = ocpf_get_SPropValue(context_id, &cValues);
 
-       retval = SetProps(&obj_message, lpProps, cValues);
+       retval = SetProps(&obj_message, 0, lpProps, cValues);
        MAPIFreeBuffer(lpProps);
        if (retval != MAPI_E_SUCCESS) return false;
 
@@ -2677,7 +2677,7 @@ static bool openchangeclient_ocpf_dump(TALLOC_CTX *mem_ctx, mapi_object_t *obj_s
        if (retval != MAPI_E_SUCCESS) return false;
 
        /* Step 3. retrieve all message properties */
-       retval = GetPropsAll(&obj_message, &lpProps);
+       retval = GetPropsAll(&obj_message, MAPI_UNICODE, &lpProps);
 
        /* Step 4. save the message */
        ret = ocpf_init();
index 2c6fb91c9448efc088e3955f7222c43a3a54c913..35015e6a9fc5126cb442cfba3671737141866e75 100644 (file)
@@ -185,7 +185,7 @@ static enum MAPISTATUS openchangepfadmin_mkdir(mapi_object_t *obj_container,
                set_SPropValue_proptag(&props[0], PR_CONTAINER_CLASS, (const void *) type);
                prop_count++;
 
-               retval = SetProps(&obj_folder, props, prop_count);
+               retval = SetProps(&obj_folder, 0, props, prop_count);
                mapi_object_release(&obj_folder);
                MAPI_RETVAL_IF(retval, GetLastError(), NULL);
        }