nspi: use PropertyTagArray_r for minimal ids.
authorBrad Hards <bradh@openchange.org>
Thu, 17 Mar 2011 02:02:22 +0000 (02:02 +0000)
committerBrad Hards <bradh@openchange.org>
Thu, 17 Mar 2011 02:02:22 +0000 (02:02 +0000)
exchange.idl
libmapi/IABContainer.c
libmapi/IMAPISession.c
libmapi/IProfAdmin.c
libmapi/libmapi.h
libmapi/nspi.c
mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.c
mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.h
mapiproxy/servers/default/nspi/emsabp.c
utils/mapitest/modules/module_nspi.c

index 23d4528532d4948a6807c34fa06a75ef2dd157cd..561f853982597e001f7d7c038201dc84c0eb5f27 100644 (file)
@@ -499,48 +499,48 @@ System Attendant Private Interface
        /*****************/
        /* Function 0x04 */
        MAPISTATUS NspiSeekEntries(
-               [in]            policy_handle   *handle,
-               [in]            uint32          Reserved,
-               [in,out]        STAT            *pStat,
-               [in]            SPropValue      *pTarget,
-               [in,unique]     SPropTagArray   *lpETable,
-               [in,unique]     SPropTagArray   *pPropTags,
-               [out]           SRowSet         **pRows
+               [in]            policy_handle           *handle,
+               [in]            uint32                  Reserved,
+               [in,out]        STAT                    *pStat,
+               [in]            SPropValue              *pTarget,
+               [in,unique]     PropertyTagArray_r      *lpETable,
+               [in,unique]     SPropTagArray           *pPropTags,
+               [out]           SRowSet                 **pRows
                );
 
        /*****************/
        /* Function 0x05 */
        MAPISTATUS NspiGetMatches(
-               [in]            policy_handle   *handle,
-               [in]            uint32          Reserved,
-               [in,out]        STAT            *pStat,
-               [in][unique]    SPropTagArray   *pReserved,
-               [in]            uint32          Reserved2,
-               [in][unique]    Restriction_r   *Filter,
-               [in][unique]    PropertyName_r  *lpPropName,
-               [in]            uint32          ulRequested,
-               [out]           SPropTagArray   **ppOutMIds,
-               [in][unique]    SPropTagArray   *pPropTags,
-               [out]           SRowSet         **ppRows
+               [in]            policy_handle           *handle,
+               [in]            uint32                  Reserved,
+               [in,out]        STAT                    *pStat,
+               [in][unique]    SPropTagArray           *pReserved,
+               [in]            uint32                  Reserved2,
+               [in][unique]    Restriction_r           *Filter,
+               [in][unique]    PropertyName_r          *lpPropName,
+               [in]            uint32                  ulRequested,
+               [out]           PropertyTagArray_r      **ppOutMIds,
+               [in][unique]    SPropTagArray           *pPropTags,
+               [out]           SRowSet                 **ppRows
                );
 
        /*****************/
        /* Function 0x06 */
        MAPISTATUS NspiResortRestriction(
-               [in] policy_handle      *handle,
-               [in] uint32             Reserved,
-               [in,out] STAT           *pStat,
-               [in] SPropTagArray      *pInMIds,
-               [in,out] SPropTagArray  **ppMIds
+               [in] policy_handle              *handle,
+               [in] uint32                     Reserved,
+               [in,out] STAT                   *pStat,
+               [in] PropertyTagArray_r         *pInMIds,
+               [in,out] PropertyTagArray_r     **ppMIds
                );
 
        /*****************/
        /* Function 0x07 */
        MAPISTATUS NspiDNToMId(
-               [in] policy_handle      *handle,
-               [in] uint32             Reserved,
-               [in] StringsArray_r     *pNames,
-               [out] SPropTagArray     **ppMIds
+               [in] policy_handle              *handle,
+               [in] uint32                     Reserved,
+               [in] StringsArray_r             *pNames,
+               [out] PropertyTagArray_r        **ppMIds
                );
 
        /*****************/
index 433547d23d72fb69c49ad2a7f864f39372d03820..d6019bc3d97cca91db95f77cd9f526660c9ac8ac 100644 (file)
@@ -280,7 +280,7 @@ _PUBLIC_ enum MAPISTATUS GetABRecipientInfo(struct mapi_session *session,
        struct nspi_context             *nspi_ctx;
        struct SRowSet                  *SRowSet;
        struct SPropTagArray            *SPropTagArray = NULL;
-       struct SPropTagArray            *pMId = NULL;
+       struct PropertyTagArray_r       *pMId = NULL;
        struct PropertyTagArray_r       *flaglist = NULL;
        struct StringsArray_r           pNames;
        const char                      *usernames[2];
@@ -330,7 +330,7 @@ _PUBLIC_ enum MAPISTATUS GetABRecipientInfo(struct mapi_session *session,
        pNames.Count = 0x1;
        pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
        pNames.Strings[0] = email;
-       pMId = talloc_zero(mem_ctx, struct SPropTagArray);
+       pMId = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_DNToMId(nspi_ctx, mem_ctx, &pNames, &pMId);
        MAPIFreeBuffer((char *)pNames.Strings[0]);
        MAPIFreeBuffer((char **)pNames.Strings);
index 4b7a5be8120282380df0df1c02274de78a0e3c9f..3efc8723b8166d7bfa58b29c4e667aea431c854b 100644 (file)
@@ -32,18 +32,18 @@ static enum MAPISTATUS FindGoodServer(struct mapi_session *session,
                                      const char *legacyDN, 
                                      bool server)
 {
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi;
-       struct StringsArray_r   pNames;
-       struct SRowSet          *SRowSet;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct SPropTagArray    *MId_array;
-       struct StringArray_r    *MVszA = NULL;
-       const char              *binding = NULL;
-       char                    *HomeMDB = NULL;
-       char                    *server_dn;
-       uint32_t                i;
+       TALLOC_CTX                      *mem_ctx;
+       enum MAPISTATUS                 retval;
+       struct nspi_context             *nspi;
+       struct StringsArray_r           pNames;
+       struct SRowSet                  *SRowSet;
+       struct SPropTagArray            *SPropTagArray = NULL;
+       struct PropertyTagArray_r       *MId_array;
+       struct StringArray_r            *MVszA = NULL;
+       const char                      *binding = NULL;
+       char                            *HomeMDB = NULL;
+       char                            *server_dn;
+       uint32_t                        i;
 
        /* Sanity checks */
        OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
@@ -59,7 +59,7 @@ static enum MAPISTATUS FindGoodServer(struct mapi_session *session,
                pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
                pNames.Strings[0] = (const char *) talloc_strdup(pNames.Strings, legacyDN);
 
-               MId_array = talloc_zero(mem_ctx, struct SPropTagArray);
+               MId_array = talloc_zero(mem_ctx, struct PropertyTagArray_r);
                retval = nspi_DNToMId(nspi, mem_ctx, &pNames, &MId_array);
                MAPIFreeBuffer(pNames.Strings);
                OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
@@ -84,7 +84,7 @@ static enum MAPISTATUS FindGoodServer(struct mapi_session *session,
        pNames.Count = 0x1;
        pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
        pNames.Strings[0] = (const char *) talloc_strdup(pNames.Strings, server_dn);
-       MId_array = talloc_zero(mem_ctx, struct SPropTagArray);
+       MId_array = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_DNToMId(nspi, mem_ctx, &pNames, &MId_array);
        MAPIFreeBuffer(pNames.Strings);
        OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
index 3ef24cdde1a66a60fde6cdc5e12d644ba71fcda4..e15f0d1cd5cbfedcb16ab6a8428df7766436f2a6 100644 (file)
@@ -1536,21 +1536,21 @@ _PUBLIC_ enum MAPISTATUS ProcessNetworkProfile(struct mapi_session *session,
                                               mapi_profile_callback_t callback, 
                                               const void *private_data)
 {
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct mapi_context     *mapi_ctx;
-       struct nspi_context     *nspi;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct Restriction_r    Filter;
-       struct SRowSet          *SRowSet;
-       struct SPropValue       *lpProp = NULL;
-       struct SPropTagArray    *MIds = NULL;
-       struct SPropTagArray    MIds2;
-       struct SPropTagArray    *MId_server = NULL;
-       struct StringsArray_r   pNames;
-       const char              *profname;
-       uint32_t                instance_key = 0;
-       uint32_t                index = 0;
+       TALLOC_CTX                      *mem_ctx;
+       enum MAPISTATUS                 retval;
+       struct mapi_context             *mapi_ctx;
+       struct nspi_context             *nspi;
+       struct SPropTagArray            *SPropTagArray = NULL;
+       struct Restriction_r            Filter;
+       struct SRowSet                  *SRowSet;
+       struct SPropValue               *lpProp = NULL;
+       struct PropertyTagArray_r       *MIds = NULL;
+       struct PropertyTagArray_r       MIds2;
+       struct PropertyTagArray_r       *MId_server = NULL;
+       struct StringsArray_r           pNames;
+       const char                      *profname;
+       uint32_t                        instance_key = 0;
+       uint32_t                        index = 0;
 
        OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
        OPENCHANGE_RETVAL_IF(!session->nspi->ctx, MAPI_E_END_OF_SESSION, NULL);
@@ -1601,7 +1601,7 @@ _PUBLIC_ enum MAPISTATUS ProcessNetworkProfile(struct mapi_session *session,
        Filter.res.resProperty.lpProp = lpProp;
 
        SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
+       MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_GetMatches(nspi, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
        MAPIFreeBuffer(SPropTagArray);
        MAPIFreeBuffer(lpProp);
@@ -1628,7 +1628,7 @@ _PUBLIC_ enum MAPISTATUS ProcessNetworkProfile(struct mapi_session *session,
        MAPIFreeBuffer(MIds);
        
        MIds2.cValues = 0x1;
-       MIds2.aulPropTag = (enum MAPITAGS *) &instance_key;
+       MIds2.aulPropTag = &instance_key;
 
        set_profile_attribute(mapi_ctx, profname, *SRowSet, index, PR_EMAIL_ADDRESS, "EmailAddress");
        set_profile_attribute(mapi_ctx, profname, *SRowSet, index, PR_DISPLAY_NAME, "DisplayName");
@@ -1678,7 +1678,7 @@ _PUBLIC_ enum MAPISTATUS ProcessNetworkProfile(struct mapi_session *session,
        pNames.Strings[0] = (const char *) talloc_asprintf(mem_ctx, SERVER_DN, 
                                                           nspi->org, nspi->org_unit, 
                                                           nspi->servername);
-       MId_server = talloc_zero(mem_ctx, struct SPropTagArray);
+       MId_server = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_DNToMId(nspi, mem_ctx, &pNames, &MId_server);
        MAPIFreeBuffer((char *)pNames.Strings[0]);
        MAPIFreeBuffer((char **)pNames.Strings);
index 355069ee57a216c66a492cac04ccbb89dea9ec34..cadd7599bd4b2a7c4d3caa2431156b9a7c6aa1b6 100644 (file)
@@ -95,13 +95,13 @@ __BEGIN_DECLS
 struct nspi_context    *nspi_bind(TALLOC_CTX *, struct dcerpc_pipe *, struct cli_credentials *, uint32_t, uint32_t, uint32_t);
 enum MAPISTATUS                nspi_unbind(struct nspi_context *);
 enum MAPISTATUS                nspi_UpdateStat(struct nspi_context *, TALLOC_CTX *, uint32_t *);
-enum MAPISTATUS                nspi_QueryRows(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct SPropTagArray *, uint32_t, struct SRowSet **);
-enum MAPISTATUS                nspi_SeekEntries(struct nspi_context *, TALLOC_CTX *, enum TableSortOrders, struct SPropValue *, struct SPropTagArray *, struct SPropTagArray *, struct SRowSet **);
-enum MAPISTATUS                nspi_GetMatches(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct Restriction_r *, struct SRowSet **, struct SPropTagArray **);
-enum MAPISTATUS                nspi_ResortRestriction(struct nspi_context *, TALLOC_CTX *, enum TableSortOrders, struct SPropTagArray *, struct SPropTagArray **);
-enum MAPISTATUS                nspi_DNToMId(struct nspi_context *, TALLOC_CTX *, struct StringsArray_r *, struct SPropTagArray **);
+enum MAPISTATUS                nspi_QueryRows(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct PropertyTagArray_r *MIds, uint32_t, struct SRowSet **);
+enum MAPISTATUS                nspi_SeekEntries(struct nspi_context *, TALLOC_CTX *, enum TableSortOrders, struct SPropValue *, struct SPropTagArray *, struct PropertyTagArray_r *pMIds, struct SRowSet **);
+enum MAPISTATUS                nspi_GetMatches(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct Restriction_r *, struct SRowSet **, struct PropertyTagArray_r **ppOutMIds);
+enum MAPISTATUS                nspi_ResortRestriction(struct nspi_context *, TALLOC_CTX *, enum TableSortOrders, struct PropertyTagArray_r *pInMIds, struct PropertyTagArray_r **ppMIds);
+enum MAPISTATUS                nspi_DNToMId(struct nspi_context *, TALLOC_CTX *, struct StringsArray_r *, struct PropertyTagArray_r **ppMIds);
 enum MAPISTATUS                nspi_GetPropList(struct nspi_context *, TALLOC_CTX *, bool, uint32_t, struct SPropTagArray **);
-enum MAPISTATUS                nspi_GetProps(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct SPropTagArray *, struct SRowSet **);
+enum MAPISTATUS                nspi_GetProps(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct PropertyTagArray_r *MId, struct SRowSet **);
 enum MAPISTATUS                nspi_CompareMIds(struct nspi_context *, TALLOC_CTX *, uint32_t, uint32_t, uint32_t *);
 enum MAPISTATUS                nspi_ModProps(struct nspi_context *, TALLOC_CTX *, uint32_t, struct SPropTagArray *, struct SRow *);
 enum MAPISTATUS                nspi_GetSpecialTable(struct nspi_context *, TALLOC_CTX *, uint32_t, struct SRowSet **);
index 16ed390e53c59ec56ca17a8ac2f72f6c9e0d8c7e..a1d4703398e64d343df0014876f350bb1011e38c 100644 (file)
@@ -240,7 +240,7 @@ _PUBLIC_ enum MAPISTATUS nspi_UpdateStat(struct nspi_context *nspi_ctx,
 _PUBLIC_ enum MAPISTATUS nspi_QueryRows(struct nspi_context *nspi_ctx, 
                                        TALLOC_CTX *mem_ctx,
                                        struct SPropTagArray *pPropTags,
-                                       struct SPropTagArray *MIds, 
+                                       struct PropertyTagArray_r *MIds, 
                                        uint32_t count,
                                        struct SRowSet **ppRows)
 {
@@ -326,7 +326,7 @@ _PUBLIC_ enum MAPISTATUS nspi_SeekEntries(struct nspi_context *nspi_ctx,
                                          enum TableSortOrders SortType,
                                          struct SPropValue *pTarget,
                                          struct SPropTagArray *pPropTags,
-                                         struct SPropTagArray *pMIds,
+                                         struct PropertyTagArray_r *pMIds,
                                          struct SRowSet **pRows)
 {
        struct NspiSeekEntries          r;
@@ -402,7 +402,7 @@ _PUBLIC_ enum MAPISTATUS nspi_GetMatches(struct nspi_context *nspi_ctx,
                                         struct SPropTagArray *pPropTags,
                                         struct Restriction_r *Filter,
                                         struct SRowSet **ppRows,
-                                        struct SPropTagArray **ppOutMIds)
+                                        struct PropertyTagArray_r **ppOutMIds)
 {
        struct NspiGetMatches           r;
        NTSTATUS                        status;
@@ -467,13 +467,13 @@ _PUBLIC_ enum MAPISTATUS nspi_GetMatches(struct nspi_context *nspi_ctx,
 _PUBLIC_ enum MAPISTATUS nspi_ResortRestriction(struct nspi_context *nspi_ctx,
                                                TALLOC_CTX *mem_ctx,
                                                enum TableSortOrders SortType,
-                                               struct SPropTagArray *pInMIds,
-                                               struct SPropTagArray **ppMIds)
+                                               struct PropertyTagArray_r *pInMIds,
+                                               struct PropertyTagArray_r **ppMIds)
 {
        struct NspiResortRestriction    r;
        enum MAPISTATUS                 retval;
        NTSTATUS                        status;
-       struct SPropTagArray            *ppInMIds = NULL;
+       struct PropertyTagArray_r               *ppInMIds = NULL;
        struct STAT                     *pStat = NULL;
 
        /* Sanity checks */
@@ -520,7 +520,7 @@ _PUBLIC_ enum MAPISTATUS nspi_ResortRestriction(struct nspi_context *nspi_ctx,
 _PUBLIC_ enum MAPISTATUS nspi_DNToMId(struct nspi_context *nspi_ctx, 
                                      TALLOC_CTX *mem_ctx,
                                      struct StringsArray_r *pNames,
-                                     struct SPropTagArray **ppMIds)
+                                     struct PropertyTagArray_r **ppMIds)
 {
        struct NspiDNToMId      r;
        NTSTATUS                status;
@@ -610,7 +610,7 @@ _PUBLIC_ enum MAPISTATUS nspi_GetPropList(struct nspi_context *nspi_ctx,
 _PUBLIC_ enum MAPISTATUS nspi_GetProps(struct nspi_context *nspi_ctx, 
                                       TALLOC_CTX *mem_ctx,
                                       struct SPropTagArray *pPropTags, 
-                                      struct SPropTagArray *MId,
+                                      struct PropertyTagArray_r *MId,
                                       struct SRowSet **SRowSet)
 
 {
index 9b16f62be2ac84334a9151a40f34d71cd4d0caed..3296642c62e5d45b52b12c4f3fd698c0246492b0 100644 (file)
@@ -361,7 +361,7 @@ static enum MAPISTATUS dcesrv_NspiGetMatches(struct dcesrv_call_state *dce_call,
        enum MAPISTATUS                 retval;
        struct exchange_nsp_session     *session;
        struct emsabp_context           *emsabp_ctx = NULL;
-       struct SPropTagArray            *ppOutMIds = NULL;
+       struct PropertyTagArray_r       *ppOutMIds = NULL;
        uint32_t                        i;
        bool                            found = false;
        
@@ -384,7 +384,7 @@ static enum MAPISTATUS dcesrv_NspiGetMatches(struct dcesrv_call_state *dce_call,
        OPENCHANGE_RETVAL_IF(found == false, MAPI_E_LOGON_FAILED, NULL);
 
        /* Step 1. Retrieve MIds array given search criterias */
-       ppOutMIds = talloc_zero(mem_ctx, struct SPropTagArray);
+       ppOutMIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        ppOutMIds->cValues = 0;
        ppOutMIds->aulPropTag = NULL;
 
@@ -482,10 +482,10 @@ static enum MAPISTATUS dcesrv_NspiDNToMId(struct dcesrv_call_state *dce_call,
 
        OPENCHANGE_RETVAL_IF(found == false, MAPI_E_LOGON_FAILED, NULL);
        
-       r->out.ppMIds = talloc_array(mem_ctx, struct SPropTagArray *, 2);
-       r->out.ppMIds[0] = talloc_zero(mem_ctx, struct SPropTagArray);
+       r->out.ppMIds = talloc_array(mem_ctx, struct PropertyTagArray_r *, 2);
+       r->out.ppMIds[0] = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        r->out.ppMIds[0]->cValues = r->in.pNames->Count;
-       r->out.ppMIds[0]->aulPropTag = (enum MAPITAGS *) talloc_array(mem_ctx, uint32_t, r->in.pNames->Count);
+       r->out.ppMIds[0]->aulPropTag = talloc_array(mem_ctx, uint32_t, r->in.pNames->Count);
 
        for (i = 0; i < r->in.pNames->Count; i++) {
                /* Step 1. Check if the input legacyDN exists */
index 1bc3517a5d858a2b0db5231a124886e78e8d0736..8ee456ba488b199b6eca952c909e20b78ff231dd 100644 (file)
@@ -130,7 +130,7 @@ enum MAPISTATUS             emsabp_fetch_attrs_from_msg(TALLOC_CTX *, struct emsabp_context
 enum MAPISTATUS                emsabp_fetch_attrs(TALLOC_CTX *, struct emsabp_context *, struct SRow *, uint32_t, uint32_t, struct SPropTagArray *);
 enum MAPISTATUS                emsabp_table_fetch_attrs(TALLOC_CTX *, struct emsabp_context *, struct SRow *, uint32_t, struct PermanentEntryID *, 
                                                 struct PermanentEntryID *, struct ldb_message *, bool);
-enum MAPISTATUS                emsabp_search(TALLOC_CTX *, struct emsabp_context *, struct SPropTagArray *, struct Restriction_r *, struct STAT *, uint32_t);
+enum MAPISTATUS                emsabp_search(TALLOC_CTX *, struct emsabp_context *, struct PropertyTagArray_r *, struct Restriction_r *, struct STAT *, uint32_t);
 enum MAPISTATUS                emsabp_search_dn(struct emsabp_context *, const char *, struct ldb_message **);
 enum MAPISTATUS                emsabp_search_legacyExchangeDN(struct emsabp_context *, const char *, struct ldb_message **, bool *);
 enum MAPISTATUS                emsabp_ab_container_by_id(TALLOC_CTX *, struct emsabp_context *, uint32_t, struct ldb_message **);
index 7067db2292fe320ceb466e65799944312dddb151..dc331d4391edcb040af74f1662fe7446fa6b9b48 100644 (file)
@@ -1003,7 +1003,7 @@ _PUBLIC_ enum MAPISTATUS emsabp_get_CreationTemplatesTable(TALLOC_CTX *mem_ctx,
    \return MAPI_E_SUCCESS on success, otherwise MAPI error
  */
 _PUBLIC_ enum MAPISTATUS emsabp_search(TALLOC_CTX *mem_ctx, struct emsabp_context *emsabp_ctx,
-                                      struct SPropTagArray *MIds, struct Restriction_r *restriction,
+                                      struct PropertyTagArray_r *MIds, struct Restriction_r *restriction,
                                       struct STAT *pStat, uint32_t limit)
 {
        enum MAPISTATUS                 retval;
@@ -1071,7 +1071,7 @@ _PUBLIC_ enum MAPISTATUS emsabp_search(TALLOC_CTX *mem_ctx, struct emsabp_contex
                return MAPI_E_TABLE_TOO_BIG;
        }
 
-       MIds->aulPropTag = (enum MAPITAGS *) talloc_array(emsabp_ctx->mem_ctx, uint32_t, res->count);
+       MIds->aulPropTag = talloc_array(emsabp_ctx->mem_ctx, uint32_t, res->count);
        MIds->cValues = res->count;
 
        /* Step 2. Create session MId for all fetched records */
index b50d25bed2b666af1f0df54163e9df8b06d9e549..133e912d59f2e3d161d1907053e9f4b4cd9ac61a 100644 (file)
@@ -77,14 +77,14 @@ _PUBLIC_ bool mapitest_nspi_UpdateStat(struct mapitest *mt)
  */
 _PUBLIC_ bool mapitest_nspi_QueryRows(struct mapitest *mt)
 {
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SPropTagArray    *MIds;
-       struct SRowSet          *SRowSet;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProp;
-       struct Restriction_r    Filter;
+       TALLOC_CTX                      *mem_ctx;
+       enum MAPISTATUS                 retval;
+       struct nspi_context             *nspi_ctx;
+       struct PropertyTagArray_r       *MIds;
+       struct SRowSet                  *SRowSet;
+       struct SPropTagArray            *SPropTagArray;
+       struct SPropValue               *lpProp;
+       struct Restriction_r            Filter;
 
        mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_QueryRows");
        nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
@@ -105,7 +105,7 @@ _PUBLIC_ bool mapitest_nspi_QueryRows(struct mapitest *mt)
        Filter.res.resProperty.lpProp = lpProp;
 
        SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
+       MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
        MAPIFreeBuffer(lpProp);
        MAPIFreeBuffer(SRowSet);
@@ -203,15 +203,15 @@ _PUBLIC_ bool mapitest_nspi_SeekEntries(struct mapitest *mt)
  */
 _PUBLIC_ bool mapitest_nspi_GetMatches(struct mapitest *mt)
 {
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SPropTagArray    *MIds;
-       struct SRowSet          *SRowSet;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProp;
-       struct Restriction_r    Filter;
-       bool                    ret = true;
+       TALLOC_CTX                      *mem_ctx;
+       enum MAPISTATUS                 retval;
+       struct nspi_context             *nspi_ctx;
+       struct PropertyTagArray_r       *MIds;
+       struct SRowSet                  *SRowSet;
+       struct SPropTagArray            *SPropTagArray;
+       struct SPropValue               *lpProp;
+       struct Restriction_r            Filter;
+       bool                            ret = true;
 
        mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_GetMatches");
        nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
@@ -232,7 +232,7 @@ _PUBLIC_ bool mapitest_nspi_GetMatches(struct mapitest *mt)
        Filter.res.resProperty.lpProp = lpProp;
 
        SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
+       MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
        MAPIFreeBuffer(lpProp);
        MAPIFreeBuffer(SRowSet);
@@ -257,16 +257,16 @@ _PUBLIC_ bool mapitest_nspi_GetMatches(struct mapitest *mt)
  */
 _PUBLIC_ bool mapitest_nspi_ResortRestriction(struct mapitest *mt)
 {
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct Restriction_r    Filter;
-       struct SRowSet          *SRowSet = NULL;
-       struct SPropTagArray    *SPropTagArray = NULL;
-       struct SPropValue       *lpProp = NULL;
-       struct SPropTagArray    *MIds = NULL;
-       struct SPropTagArray    *ppMIds = NULL;
-       bool                    ret = true;
+       TALLOC_CTX                      *mem_ctx;
+       enum MAPISTATUS                 retval;
+       struct nspi_context             *nspi_ctx;
+       struct Restriction_r            Filter;
+       struct SRowSet                  *SRowSet = NULL;
+       struct SPropTagArray            *SPropTagArray = NULL;
+       struct SPropValue               *lpProp = NULL;
+       struct PropertyTagArray_r       *MIds = NULL;
+       struct PropertyTagArray_r       *ppMIds = NULL;
+       bool                            ret = true;
 
        mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_ResortRestriction");
        nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
@@ -298,7 +298,7 @@ _PUBLIC_ bool mapitest_nspi_ResortRestriction(struct mapitest *mt)
        Filter.res.resProperty.lpProp = lpProp;
 
        SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
+       MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
        MAPIFreeBuffer(lpProp);
        MAPIFreeBuffer(SPropTagArray);
@@ -310,7 +310,7 @@ _PUBLIC_ bool mapitest_nspi_ResortRestriction(struct mapitest *mt)
                return false;
        }
 
-       ppMIds = talloc_zero(mem_ctx, struct SPropTagArray);
+       ppMIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_ResortRestriction(nspi_ctx, mem_ctx, SortTypeDisplayName, MIds, &ppMIds);
        mapitest_print_retval_clean(mt, "NspiResortRestriction", retval);
        if (retval != MAPI_E_SUCCESS) {
@@ -334,11 +334,11 @@ _PUBLIC_ bool mapitest_nspi_ResortRestriction(struct mapitest *mt)
  */
 _PUBLIC_ bool mapitest_nspi_DNToMId(struct mapitest *mt)
 {
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct StringsArray_r   pNames;
-       struct SPropTagArray    *MId;
+       TALLOC_CTX                      *mem_ctx;
+       enum MAPISTATUS                 retval;
+       struct nspi_context             *nspi_ctx;
+       struct StringsArray_r           pNames;
+       struct PropertyTagArray_r       *MId;
 
        mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_DNToMId");
        nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
@@ -347,7 +347,7 @@ _PUBLIC_ bool mapitest_nspi_DNToMId(struct mapitest *mt)
        pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
        pNames.Strings[0] = mt->mapi_ctx->session->profile->homemdb;
 
-       MId = talloc_zero(mem_ctx, struct SPropTagArray);
+       MId = talloc_zero(mem_ctx, struct PropertyTagArray_r);
 
        retval = nspi_DNToMId(nspi_ctx, mem_ctx, &pNames, &MId);
        MAPIFreeBuffer((char **)pNames.Strings);
@@ -373,15 +373,15 @@ _PUBLIC_ bool mapitest_nspi_DNToMId(struct mapitest *mt)
  */
 _PUBLIC_ bool mapitest_nspi_GetPropList(struct mapitest *mt)
 {
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SPropTagArray    *pPropTags = 0;
-       struct SPropTagArray    *MIds;
-       struct SPropValue       *lpProp;
-       struct Restriction_r    Filter;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          *SRowSet;
+       TALLOC_CTX                      *mem_ctx;
+       enum MAPISTATUS                 retval;
+       struct nspi_context             *nspi_ctx;
+       struct SPropTagArray            *pPropTags = 0;
+       struct PropertyTagArray_r       *MIds;
+       struct SPropValue               *lpProp;
+       struct Restriction_r            Filter;
+       struct SPropTagArray            *SPropTagArray;
+       struct SRowSet                  *SRowSet;
 
        mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_GetPropList");
        nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
@@ -399,7 +399,7 @@ _PUBLIC_ bool mapitest_nspi_GetPropList(struct mapitest *mt)
        Filter.res.resProperty.lpProp = lpProp;
 
        SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
+       MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
        MAPIFreeBuffer(SPropTagArray);
        MAPIFreeBuffer(lpProp);
@@ -442,13 +442,13 @@ _PUBLIC_ bool mapitest_nspi_GetPropList(struct mapitest *mt)
  */
 _PUBLIC_ bool mapitest_nspi_GetProps(struct mapitest *mt)
 {
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct StringsArray_r   pNames;
-       struct SPropTagArray    *MId;
-       struct SPropTagArray    *SPropTagArray;
-       struct SRowSet          *SRowSet;
+       TALLOC_CTX                      *mem_ctx;
+       enum MAPISTATUS                 retval;
+       struct nspi_context             *nspi_ctx;
+       struct StringsArray_r           pNames;
+       struct PropertyTagArray_r       *MId;
+       struct SPropTagArray            *SPropTagArray;
+       struct SRowSet                  *SRowSet;
 
        mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_GetProps");
        nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
@@ -457,7 +457,7 @@ _PUBLIC_ bool mapitest_nspi_GetProps(struct mapitest *mt)
        pNames.Strings = (const char **) talloc_array(mem_ctx, char **, 1);
        pNames.Strings[0] = mt->mapi_ctx->session->profile->homemdb;
 
-       MId = talloc_zero(mem_ctx, struct SPropTagArray);
+       MId = talloc_zero(mem_ctx, struct PropertyTagArray_r);
 
        retval = nspi_DNToMId(nspi_ctx, mem_ctx, &pNames, &MId);
        MAPIFreeBuffer((char **)pNames.Strings);
@@ -496,15 +496,15 @@ _PUBLIC_ bool mapitest_nspi_GetProps(struct mapitest *mt)
  */
 _PUBLIC_ bool mapitest_nspi_CompareMIds(struct mapitest *mt)
 {
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       uint32_t                plResult;
-       struct SPropTagArray    *MIds;
-       struct SRowSet          *SRowSet;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProp;
-       struct Restriction_r    Filter;
+       TALLOC_CTX                      *mem_ctx;
+       enum MAPISTATUS                 retval;
+       struct nspi_context             *nspi_ctx;
+       uint32_t                        plResult;
+       struct PropertyTagArray_r       *MIds;
+       struct SRowSet                  *SRowSet;
+       struct SPropTagArray            *SPropTagArray;
+       struct SPropValue               *lpProp;
+       struct Restriction_r            Filter;
 
        mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_CompareMIds");
        nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
@@ -524,7 +524,7 @@ _PUBLIC_ bool mapitest_nspi_CompareMIds(struct mapitest *mt)
        Filter.res.resProperty.lpProp = lpProp;
 
        SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
+       MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
        MAPIFreeBuffer(lpProp);
        MAPIFreeBuffer(SPropTagArray);
@@ -568,19 +568,19 @@ _PUBLIC_ bool mapitest_nspi_CompareMIds(struct mapitest *mt)
 */
 _PUBLIC_ bool mapitest_nspi_ModProps(struct mapitest *mt)
 {
-       TALLOC_CTX              *mem_ctx;
-       enum MAPISTATUS         retval;
-       struct nspi_context     *nspi_ctx;
-       struct SRow             *pRow;
-       struct SPropTagArray    *pPropTags;
-       struct SPropValue       modProp;
-       struct SPropTagArray    *MIds;
-       struct SRowSet          *SRowSet;
-       struct SPropTagArray    *SPropTagArray;
-       struct SPropValue       *lpProp;
-       struct Restriction_r    Filter;
-       const char              *original_office_location;
-       bool                    ret = true;
+       TALLOC_CTX                      *mem_ctx;
+       enum MAPISTATUS                 retval;
+       struct nspi_context             *nspi_ctx;
+       struct SRow                     *pRow;
+       struct SPropTagArray            *pPropTags;
+       struct SPropValue               modProp;
+       struct PropertyTagArray_r       *MIds;
+       struct SRowSet                  *SRowSet;
+       struct SPropTagArray            *SPropTagArray;
+       struct SPropValue               *lpProp;
+       struct Restriction_r            Filter;
+       const char                      *original_office_location;
+       bool                            ret = true;
 
        mem_ctx = talloc_named(NULL, 0, "mapitest_nspi_ModProps");
        nspi_ctx = (struct nspi_context *) mt->session->nspi->ctx;
@@ -601,7 +601,7 @@ _PUBLIC_ bool mapitest_nspi_ModProps(struct mapitest *mt)
        Filter.res.resProperty.lpProp = lpProp;
 
        SRowSet = talloc_zero(mem_ctx, struct SRowSet);
-       MIds = talloc_zero(mem_ctx, struct SPropTagArray);
+       MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
        retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
        MAPIFreeBuffer(lpProp);
        MAPIFreeBuffer(SRowSet);