C# Class Microsoft.Protocols.TestSuites.MS_OXNSPI.NspiMapiHttpAdapter

The MapiHttpAdapter class contains the MAPIHTTP implements for the interfaces of IMS_OXNSPIAdapter.
Show file Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Public Methods

Method Description
Bind ( uint flags, STAT stat, FlatUID_r &serverGuid ) : ErrorCodeValue

The NspiBind method initiates a session between a client and the server.

CompareMIds ( uint reserved, STAT stat, uint mid1, uint mid2, int &results ) : ErrorCodeValue

The NspiCompareMIds method compares the position in an address book container of two objects identified by Minimal Entry ID and returns the value of the comparison.

DNToMId ( uint reserved, StringsArray_r names, PropertyTagArray_r &mids ) : ErrorCodeValue

The NspiDNToMId method maps a set of DN to a set of Minimal Entry ID.

GetMatches ( uint reserved, STAT &stat, PropertyTagArray_r proReserved, uint reserved2, Restriction_r filter, PropertyName_r propName, uint requested, PropertyTagArray_r &outMids, PropertyTagArray_r propTags, PropertyRowSet_r &rows ) : ErrorCodeValue

The NspiGetMatches method returns an Explicit Table.

GetPropList ( uint flags, uint mid, uint codePage, PropertyTagArray_r &propTags ) : ErrorCodeValue

The NspiGetPropList method returns a list of all the properties that have values on a specified object.

GetProps ( uint flags, STAT stat, PropertyTagArray_r propTags, PropertyRow_r &rows ) : ErrorCodeValue

The NspiGetProps method returns an address book row that contains a set of the properties and values that exist on an object.

GetSpecialTable ( uint flags, STAT &stat, uint &version, PropertyRowSet_r &rows ) : ErrorCodeValue

The NspiGetSpecialTable method returns the rows of a special table to the client.

GetTemplateInfo ( uint flags, uint type, string dn, uint codePage, uint localeID, PropertyRow_r &data ) : ErrorCodeValue

The NspiGetTemplateInfo method returns information about template objects.

ModLinkAtt ( uint flags, uint propTag, uint mid, BinaryArray_r entryIds ) : ErrorCodeValue

The NspiModLinkAtt method modifies the values of a specific property of a specific row in the address book.

ModProps ( STAT stat, PropertyTagArray_r propTags, PropertyRow_r row ) : ErrorCodeValue

The NspiModProps method is used to modify the properties of an object in the address book.

NspiMapiHttpAdapter ( ITestSite site, string userName, string password, string domainName, string addressBookUrl ) : System

Initializes a new instance of the NspiMapiHttpAdapter class.

QueryColumns ( uint flags, PropertyTagArray_r &columns ) : ErrorCodeValue

The NspiQueryColumns method returns a list of all the properties that the server is aware of.

QueryRows ( uint flags, STAT &stat, uint tableCount, uint table, uint count, PropertyTagArray_r propTags, PropertyRowSet_r &rows ) : ErrorCodeValue

The NspiQueryRows method returns a number of rows from a specified table to the client.

ResolveNames ( uint reserved, STAT stat, PropertyTagArray_r propTags, WStringsArray_r wstr, PropertyTagArray_r &mids, PropertyRowSet_r &rows ) : ErrorCodeValue

The NspiResolveNamesW method takes a set of string values in the Unicode character set and performs ANR on those strings.

ResortRestriction ( uint reserved, STAT &stat, PropertyTagArray_r proInMIds, PropertyTagArray_r &outMIds ) : ErrorCodeValue

The NspiResortRestriction method applies to a sort order to the objects in a restricted address book container.

SeekEntries ( uint reserved, STAT &stat, PropertyValue_r target, PropertyTagArray_r table, PropertyTagArray_r propTags, PropertyRowSet_r &rows ) : ErrorCodeValue

The NspiSeekEntries method searches for and sets the logical position in a specific table to the first entry greater than or equal to a specified value.

Unbind ( uint reserved ) : uint

The NspiUnbind method destroys the context handle. No other action is taken.

UpdateStat ( STAT &stat, int &delta ) : ErrorCodeValue

The NspiUpdateStat method updates the STAT block that represents the position in a table to reflect positioning changes requested by the client.

Private Methods

Method Description
BuildBindRequestBody ( STAT stat, uint flags ) : BindRequestBody

Initialize Bind request body.

BuildGetPropListRequestBody ( uint flag, uint mid, uint codePage ) : GetPropListRequestBody

Initialize the GetPropList request body.

BuildGetPropsRequestBody ( uint flags, bool hasState, STAT stat, bool hasPropertyTags, LargePropTagArray propetyTags ) : GetPropsRequestBody

Initialize the GetProps request body.

BuildQueryColumnsRequestBody ( uint flag ) : QueryColumnsRequestBody

Initialize the QueryColumns request body.

BuildUnbindRequestBody ( ) : UnbindRequestBody

Initialize the Unbind request body.

BuildUpdateStatRequestBody ( STAT stat ) : UpdateStatRequestBody

Build UpdateStat request body.

SendAddressBookRequest ( IRequestBody requestBody, RequestType requestType, bool cookieChange = true ) : ChunkedResponse

Send the request to address book server endpoint.

Method Details

Bind() public method

The NspiBind method initiates a session between a client and the server.
public Bind ( uint flags, STAT stat, FlatUID_r &serverGuid ) : ErrorCodeValue
flags uint A DWORD value that contains a set of bit flags.
stat STAT A STAT block that describes a logical position in a specific address book container.
serverGuid FlatUID_r The value NULL or a pointer to a GUID value that is associated with the specific server.
return ErrorCodeValue

CompareMIds() public method

The NspiCompareMIds method compares the position in an address book container of two objects identified by Minimal Entry ID and returns the value of the comparison.
public CompareMIds ( uint reserved, STAT stat, uint mid1, uint mid2, int &results ) : ErrorCodeValue
reserved uint A DWORD value reserved for future use. Ignored by the server.
stat STAT A STAT block that describes a logical position in a specific address book container.
mid1 uint The mid1 is a DWORD value containing a Minimal Entry ID.
mid2 uint The mid2 is a DWORD value containing a Minimal Entry ID.
results int A DWORD value. On return, it contains the result of the comparison.
return ErrorCodeValue

DNToMId() public method

The NspiDNToMId method maps a set of DN to a set of Minimal Entry ID.
public DNToMId ( uint reserved, StringsArray_r names, PropertyTagArray_r &mids ) : ErrorCodeValue
reserved uint A DWORD value reserved for future use. Ignored by the server.
names StringsArray_r A StringsArray_r value. It holds a list of strings that contain DNs.
mids PropertyTagArray_r A PropertyTagArray_r value. On return, it holds a list of Minimal Entry IDs.
return ErrorCodeValue

GetMatches() public method

The NspiGetMatches method returns an Explicit Table.
public GetMatches ( uint reserved, STAT &stat, PropertyTagArray_r proReserved, uint reserved2, Restriction_r filter, PropertyName_r propName, uint requested, PropertyTagArray_r &outMids, PropertyTagArray_r propTags, PropertyRowSet_r &rows ) : ErrorCodeValue
reserved uint A DWORD value reserved for future use.
stat STAT A STAT block that describes a logical position in a specific address book container.
proReserved PropertyTagArray_r A PropertyTagArray_r reserved for future use.
reserved2 uint A DWORD value reserved for future use. Ignored by the server.
filter Restriction_r The value NULL or a Restriction_r value. /// It holds a logical restriction to apply to the rows in the address book container specified in the stat parameter.
propName PropertyName_r The value NULL or a PropertyName_r value. /// It holds the property to be opened as a restricted address book container.
requested uint A DWORD value. It contains the maximum number of rows to return in a restricted address book container.
outMids PropertyTagArray_r A PropertyTagArray_r value. On return, it holds a list of Minimal Entry IDs that comprise a restricted address book container.
propTags PropertyTagArray_r The value NULL or a reference to a PropertyTagArray_r value. /// It contains a list of the proptags of the columns that client wants to be returned for each row returned.
rows PropertyRowSet_r A reference to a PropertyRowSet_r value. It contains the address book container rows the server returns in response to the request.
return ErrorCodeValue

GetPropList() public method

The NspiGetPropList method returns a list of all the properties that have values on a specified object.
public GetPropList ( uint flags, uint mid, uint codePage, PropertyTagArray_r &propTags ) : ErrorCodeValue
flags uint A DWORD value that contains a set of bit flags.
mid uint A DWORD value that contains a Minimal Entry ID.
codePage uint The code page in which the client wants the server to express string values properties.
propTags PropertyTagArray_r A PropertyTagArray_r value. On return, it holds a list of properties.
return ErrorCodeValue

GetProps() public method

The NspiGetProps method returns an address book row that contains a set of the properties and values that exist on an object.
public GetProps ( uint flags, STAT stat, PropertyTagArray_r propTags, PropertyRow_r &rows ) : ErrorCodeValue
flags uint A DWORD value that contains a set of bit flags.
stat STAT A STAT block that describes a logical position in a specific address book container.
propTags PropertyTagArray_r The value NULL or a reference to a PropertyTagArray_r value. /// It contains a list of the proptags of the properties that the client wants to be returned.
rows PropertyRow_r A nullable PropertyRow_r value. /// It contains the address book container row the server returns in response to the request.
return ErrorCodeValue

GetSpecialTable() public method

The NspiGetSpecialTable method returns the rows of a special table to the client.
public GetSpecialTable ( uint flags, STAT &stat, uint &version, PropertyRowSet_r &rows ) : ErrorCodeValue
flags uint A DWORD value that contains a set of bit flags.
stat STAT A STAT block that describes a logical position in a specific address book container.
version uint A reference to a DWORD. On input, it holds the value of the version number of /// the address book hierarchy table that the client has. On output, it holds the version of the server's address book hierarchy table.
rows PropertyRowSet_r A PropertyRowSet_r structure. On return, it holds the rows for the table that the client is requesting.
return ErrorCodeValue

GetTemplateInfo() public method

The NspiGetTemplateInfo method returns information about template objects.
public GetTemplateInfo ( uint flags, uint type, string dn, uint codePage, uint localeID, PropertyRow_r &data ) : ErrorCodeValue
flags uint A DWORD value that contains a set of bit flags.
type uint A DWORD value. It specifies the display type of the template for which the information is requested.
dn string The value NULL or the DN of the template requested. The value is NULL-terminated.
codePage uint A DWORD value. It specifies the code page of the template for which the information is requested.
localeID uint A DWORD value. It specifies the LCID of the template for which the information is requested.
data PropertyRow_r A reference to a PropertyRow_r value. On return, it contains the information requested.
return ErrorCodeValue

ModLinkAtt() public method

The NspiModLinkAtt method modifies the values of a specific property of a specific row in the address book.
public ModLinkAtt ( uint flags, uint propTag, uint mid, BinaryArray_r entryIds ) : ErrorCodeValue
flags uint A DWORD value that contains a set of bit flags.
propTag uint A DWORD value. It contains the proptag of the property that the client wants to modify.
mid uint A DWORD value that contains the Minimal Entry ID of the address book row that the client wants to modify.
entryIds BinaryArray_r A BinaryArray value. It contains a list of EntryIDs to be used to modify the requested property on the requested address book row.
return ErrorCodeValue

ModProps() public method

The NspiModProps method is used to modify the properties of an object in the address book.
public ModProps ( STAT stat, PropertyTagArray_r propTags, PropertyRow_r row ) : ErrorCodeValue
stat STAT A STAT block that describes a logical position in a specific address book container.
propTags PropertyTagArray_r The value NULL or a reference to a PropertyTagArray_r. /// It contains a list of the proptags of the columns from which the client requests all the values to be removed.
row PropertyRow_r A PropertyRow_r value. It contains an address book row.
return ErrorCodeValue

NspiMapiHttpAdapter() public method

Initializes a new instance of the NspiMapiHttpAdapter class.
public NspiMapiHttpAdapter ( ITestSite site, string userName, string password, string domainName, string addressBookUrl ) : System
site ITestSite The Site instance.
userName string The Mailbox userName which can be used by client to connect to the SUT.
password string The user password which can be used by client to access to the SUT.
domainName string Define the name of domain where the server belongs to.
addressBookUrl string The URL that a client can use to connect with a NSPI server through MAPI over HTTP.
return System

QueryColumns() public method

The NspiQueryColumns method returns a list of all the properties that the server is aware of.
public QueryColumns ( uint flags, PropertyTagArray_r &columns ) : ErrorCodeValue
flags uint A DWORD value that contains a set of bit flags.
columns PropertyTagArray_r A PropertyTagArray_r structure that contains a list of proptags.
return ErrorCodeValue

QueryRows() public method

The NspiQueryRows method returns a number of rows from a specified table to the client.
public QueryRows ( uint flags, STAT &stat, uint tableCount, uint table, uint count, PropertyTagArray_r propTags, PropertyRowSet_r &rows ) : ErrorCodeValue
flags uint A DWORD value that contains a set of bit flags.
stat STAT A STAT block that describes a logical position in a specific address book container.
tableCount uint A DWORD value that contains the number values in the input parameter table. /// This value is limited to 100,000.
table uint An array of DWORD values, representing an Explicit Table.
count uint A DWORD value that contains the number of rows the client is requesting.
propTags PropertyTagArray_r The value NULL or a reference to a PropertyTagArray_r value, /// containing a list of the proptags of the properties that the client requires to be returned for each row returned.
rows PropertyRowSet_r A nullable PropertyRowSet_r value, it contains the address book container rows that the server returns in response to the request.
return ErrorCodeValue

ResolveNames() public method

The NspiResolveNamesW method takes a set of string values in the Unicode character set and performs ANR on those strings.
public ResolveNames ( uint reserved, STAT stat, PropertyTagArray_r propTags, WStringsArray_r wstr, PropertyTagArray_r &mids, PropertyRowSet_r &rows ) : ErrorCodeValue
reserved uint A DWORD value that is reserved for future use.
stat STAT A STAT block that describes a logical position in a specific address book container.
propTags PropertyTagArray_r The value NULL or a reference to a PropertyTagArray_r containing a list of the proptags of the columns /// that the client requests to be returned for each row returned.
wstr WStringsArray_r A WStringsArray_r value. It specifies the values on which the client is requesting the server to perform ANR.
mids PropertyTagArray_r A PropertyTagArray_r value. On return, it contains a list of Minimal Entry IDs that match the array of strings.
rows PropertyRowSet_r A reference to a PropertyRowSet_r structure. It contains the address book container rows that the server returns in response to the request.
return ErrorCodeValue

ResortRestriction() public method

The NspiResortRestriction method applies to a sort order to the objects in a restricted address book container.
public ResortRestriction ( uint reserved, STAT &stat, PropertyTagArray_r proInMIds, PropertyTagArray_r &outMIds ) : ErrorCodeValue
reserved uint A DWORD value reserved for future use. Ignored by the server.
stat STAT A STAT block that describes a logical position in a specific address book container.
proInMIds PropertyTagArray_r A PropertyTagArray_r value. /// It holds a list of Minimal Entry IDs that comprise a restricted address book container.
outMIds PropertyTagArray_r A PropertyTagArray_r value. On return, it holds a list of Minimal Entry IDs /// that comprise a restricted address book container.
return ErrorCodeValue

SeekEntries() public method

The NspiSeekEntries method searches for and sets the logical position in a specific table to the first entry greater than or equal to a specified value.
public SeekEntries ( uint reserved, STAT &stat, PropertyValue_r target, PropertyTagArray_r table, PropertyTagArray_r propTags, PropertyRowSet_r &rows ) : ErrorCodeValue
reserved uint A DWORD value that is reserved for future use. Ignored by the server.
stat STAT A STAT block that describes a logical position in a specific address book container.
target PropertyValue_r A PropertyValue_r value holding the value that is being sought.
table PropertyTagArray_r The value NULL or a PropertyTagArray_r value. /// It holds a list of Minimal Entry IDs that comprise a restricted address book container.
propTags PropertyTagArray_r It contains a list of the proptags of the columns /// that client wants to be returned for each row returned.
rows PropertyRowSet_r It contains the address book container rows the server returns in response to the request.
return ErrorCodeValue

Unbind() public method

The NspiUnbind method destroys the context handle. No other action is taken.
public Unbind ( uint reserved ) : uint
reserved uint A DWORD [MS-DTYP] value reserved for future use. This property is ignored by the server.
return uint

UpdateStat() public method

The NspiUpdateStat method updates the STAT block that represents the position in a table to reflect positioning changes requested by the client.
public UpdateStat ( STAT &stat, int &delta ) : ErrorCodeValue
stat STAT A STAT block that describes a logical position in a specific address book container.
delta int The value NULL or a pointer to a LONG value that indicates movement /// within the address book container specified by the input parameter stat.
return ErrorCodeValue