C# Class Microsoft.Protocols.TestSuites.MS_OXCNOTIF.MS_OXCNOTIFAdapter

Adapter requirements capture code for MS-OXCNOTIF server role.
Show file Open project: OfficeDev/Interop-TestSuites

Private Properties

Property Type Description
IsNullTerminatedASCIIStr bool
VerifyAsyncCallOnRPCTransport void
VerifyCallbackAddressForUDPDatagrams void
VerifyMAPITransport void
VerifyNotificationFlagsOfRopNotify void
VerifyROPTransport void
VerifyRopNotifyForNewMail void
VerifyRopNotifyForOtherEvents void
VerifyRopNotifyForTableModified void
VerifyRopNotifyResponse void
VerifyRopPendingResponse void
VerifyRopRegisterNotificationResponseHandle void
VerifyUDPTransport void

Public Methods

Method Description
BeginAsyncWait ( IntPtr acxh, IntPtr &rpcAsyncHandle ) : void

Call EcDoAsyncWaitEx method and return immediately.

DoConnect ( ConnectionType connectionType ) : bool

Connect to the server for RPC calling.

DoDisconnect ( ) : bool

Disconnect the connection with Server.

EcDoAsyncConnectEx ( ) : IntPtr

Acquire an asynchronous context handle on the server which will be used in subsequent EcDoAsyncWaitEx call.

EcRRegisterPushNotification ( AddressFamily addressFamily, int port, string opaque ) : uint

Register a callback address on the server which will be used to push notification.

EndAsyncWait ( IntPtr rpcAsyncHandle, int &flagsOut ) : int

Complete the EcDoAsyncWaitEx call.

GetNotification ( bool expectGetNotification ) : IList

Retrieve the RopNotify and RopPending response by sending an empty RPC request.

Initialize ( ITestSite testSite ) : void

Initialize the adapter.

Logon ( ) : RopLogonResponse

Logon to the server

NotificationWait ( NotificationWaitRequestBody requestBody ) : NotificationWaitSuccessResponseBody

The method to send NotificationWait request to the server.

Process ( ISerializable ropRequest, IEnumerable inputObjHandles, List &responseSOHs ) : IList

Send ROP request with single operation, multiple input object handles.

Process ( ISerializable requestRop, uint inputObjHandles, List &responseSOHs ) : IList

Send ROP request with single operation, single input object handle.

PushNotificationReceived ( AddressFamily addressFamily, int port, string &opaque ) : bool

Receive push notification on the specified port.

QueryAsyncWaitStatus ( IntPtr rpcAsyncHandle ) : RPCAsyncStatus

Get the status of EcDoAsyncWaitEx call.

RegisterNotification ( NotificationType notificationType ) : RopRegisterNotificationResponse

Create a subscription for specified notifications on the server.

RegisterNotificationWithParameter ( NotificationType notificationType, byte wantWholeStore, ulong flolderId, ulong messageId, uint &notificationHandle ) : RopRegisterNotificationResponse

Creates a subscription for specified notifications on the server.

SwitchSessionContext ( ) : void

Switch the instance of OxcropsClient.

Private Methods

Method Description
IsNullTerminatedASCIIStr ( byte buffer ) : bool

Check whether the array of byte is null terminated ASCII string

VerifyAsyncCallOnRPCTransport ( ) : void

Verify Syntax about Transport.

VerifyCallbackAddressForUDPDatagrams ( ) : void

Verify callback address is used to receive UDP datagrams.

VerifyMAPITransport ( ) : void

Verify MAPIHTTP transport.

VerifyNotificationFlagsOfRopNotify ( RopNotifyResponse ropNotifyResponse ) : void

Verify NotificationFlags of RopNotify response.

VerifyROPTransport ( ) : void

Verify Syntax about ROP Transport

VerifyRopNotifyForNewMail ( RopNotifyResponse ropNotifyResponse ) : void

Verify RopNotify response for NewMail events

VerifyRopNotifyForOtherEvents ( RopNotifyResponse ropNotifyResponse ) : void

Verify RopNotify response for other events(ObjectCreated,ObjectDeleted,ObjectModified,ObjectMoved,ObjectCopied,SearchResult)

VerifyRopNotifyForTableModified ( RopNotifyResponse ropNotifyResponse ) : void

Verify RopNotify response for TableModified events.

VerifyRopNotifyResponse ( RopNotifyResponse ropNotifyResponse ) : void

Verify RopNotify response.

VerifyRopPendingResponse ( ) : void

Verify Pending response.

VerifyRopRegisterNotificationResponseHandle ( uint registerNotificationResponseHandle ) : void

Verify register Notification response handle.

VerifyUDPTransport ( ) : void

Verify Syntax about UDP Transport.

Method Details

BeginAsyncWait() public method

Call EcDoAsyncWaitEx method and return immediately.
public BeginAsyncWait ( IntPtr acxh, IntPtr &rpcAsyncHandle ) : void
acxh IntPtr The asynchronous context handle
rpcAsyncHandle IntPtr RPC asynchronous handle
return void

DoConnect() public method

Connect to the server for RPC calling.
public DoConnect ( ConnectionType connectionType ) : bool
connectionType ConnectionType The type of connection.
return bool

DoDisconnect() public method

Disconnect the connection with Server.
public DoDisconnect ( ) : bool
return bool

EcDoAsyncConnectEx() public method

Acquire an asynchronous context handle on the server which will be used in subsequent EcDoAsyncWaitEx call.
public EcDoAsyncConnectEx ( ) : IntPtr
return IntPtr

EcRRegisterPushNotification() public method

Register a callback address on the server which will be used to push notification.
public EcRRegisterPushNotification ( AddressFamily addressFamily, int port, string opaque ) : uint
addressFamily AddressFamily The AddressFamily type specifies which IP family to use.
port int The UDP port that will receive the push notification.
opaque string The opaque client-generated context data that is sent back to the client at the callback address.
return uint

EndAsyncWait() public method

Complete the EcDoAsyncWaitEx call.
public EndAsyncWait ( IntPtr rpcAsyncHandle, int &flagsOut ) : int
rpcAsyncHandle IntPtr RPC asynchronous handle
flagsOut int The pulFlagsOut parameter returned by EcDoAsyncWaitEx
return int

GetNotification() public method

Retrieve the RopNotify and RopPending response by sending an empty RPC request.
public GetNotification ( bool expectGetNotification ) : IList
expectGetNotification bool A bool type indicating whether expect to get any notification.
return IList

Initialize() public method

Initialize the adapter.
public Initialize ( ITestSite testSite ) : void
testSite ITestSite Test site.
return void

Logon() public method

Logon to the server
public Logon ( ) : RopLogonResponse
return Microsoft.Protocols.TestSuites.Common.RopLogonResponse

NotificationWait() public method

The method to send NotificationWait request to the server.
public NotificationWait ( NotificationWaitRequestBody requestBody ) : NotificationWaitSuccessResponseBody
requestBody Microsoft.Protocols.TestSuites.Common.NotificationWaitRequestBody The NotificationWait request body.
return NotificationWaitSuccessResponseBody

Process() public method

Send ROP request with single operation, multiple input object handles.
public Process ( ISerializable ropRequest, IEnumerable inputObjHandles, List &responseSOHs ) : IList
ropRequest ISerializable The ROP request.
inputObjHandles IEnumerable The multiple input object handles.
responseSOHs List The Response SOH Table returned by ROP call, provides information like object handle.
return IList

Process() public method

Send ROP request with single operation, single input object handle.
public Process ( ISerializable requestRop, uint inputObjHandles, List &responseSOHs ) : IList
requestRop ISerializable The ROP request.
inputObjHandles uint The input object handle.
responseSOHs List The Response SOH Table returned by ROP call, provides information like object handle.
return IList

PushNotificationReceived() public method

Receive push notification on the specified port.
public PushNotificationReceived ( AddressFamily addressFamily, int port, string &opaque ) : bool
addressFamily AddressFamily The AddressFamily type specifies which IP family to use.
port int The UDP port uses to receive the push notification.
opaque string The opaque data received from server.
return bool

QueryAsyncWaitStatus() public method

Get the status of EcDoAsyncWaitEx call.
public QueryAsyncWaitStatus ( IntPtr rpcAsyncHandle ) : RPCAsyncStatus
rpcAsyncHandle IntPtr RPC asynchronous handle
return RPCAsyncStatus

RegisterNotification() public method

Create a subscription for specified notifications on the server.
public RegisterNotification ( NotificationType notificationType ) : RopRegisterNotificationResponse
notificationType Microsoft.Protocols.TestSuites.Common.NotificationType The notification type which want to subscribe.
return Microsoft.Protocols.TestSuites.Common.RopRegisterNotificationResponse

RegisterNotificationWithParameter() public method

Creates a subscription for specified notifications on the server.
public RegisterNotificationWithParameter ( NotificationType notificationType, byte wantWholeStore, ulong flolderId, ulong messageId, uint &notificationHandle ) : RopRegisterNotificationResponse
notificationType Microsoft.Protocols.TestSuites.Common.NotificationType The notification type which want to subscribe.
wantWholeStore byte The value of WantWholeStore.
flolderId ulong The value of specified folder ID.
messageId ulong The value of specified message ID
notificationHandle uint The value of notificationHandle
return Microsoft.Protocols.TestSuites.Common.RopRegisterNotificationResponse

SwitchSessionContext() public method

Switch the instance of OxcropsClient.
public SwitchSessionContext ( ) : void
return void