#region --------------- Copyright Dresser Wayne Pignone -------------
/*
* $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/Com/IPumpEvents.cs $
*
* 9 07-02-27 12:35 roger.månsson
* Set decimal MarshalAs Currency to be better compliant with COM.
*
* 8 07-02-26 14:06 roger.månsson
* Added marshalAs Currency on decimal parameters.
*
* 7 07-02-16 9:59 roger.månsson
* FxCop changes
*
* 6 07-02-02 17:17 roger.månsson
* Renamed OnReadPumpAccumulatorsCompleted->OnReadPumpAccumulatorCompleted
*
* 5 07-01-09 9:28 roger.månsson
* Documentation fixes
*
* 4 07-01-08 16:11 roger.månsson
* Added support for the SignalEvent/OnEventOccured on the pump
* interfaces.
*
* 3 07-01-05 15:15 roger.månsson
* Changed sender type to IPump
*
* 2 07-01-05 9:01 roger.månsson
* Documentation changes
*/
#endregion
using System.Runtime.InteropServices;
using System.Diagnostics.CodeAnalysis;
namespace Wayne.ForecourtControl.Com
{
///
/// Event interface for an IPump object. Contains the events that can be fired from a pump object.
///
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IPumpEvents
{
#region Response events
///
/// Event invoked when a Reserve request has completed.
///
///
/// True if the request succeeded.
/// Token object that was supplied in the asynchronous request.
void OnReserveCompleted(IPump sender, bool success, object userToken);
///
/// Event invoked when a Suspend request has completed.
///
///
/// True if the request succeeded.
/// Token object that was supplied in the asynchronous request.
void OnSuspendCompleted(IPump sender, bool success, object userToken);
///
/// Event invoked when a Resume request has completed.
///
///
/// True if the request succeeded.
/// Token object that was supplied in the asynchronous request.
void OnResumeCompleted(IPump sender, bool success, object userToken);
///
/// Event invoked when a Stop request has completed.
///
///
/// True if the request succeeded.
/// Token object that was supplied in the asynchronous request.
void OnStopCompleted(IPump sender, bool success, object userToken);
///
/// Event invoked when a SetBlocked request has completed.
///
///
/// True if the request succeeded.
/// Token object that was supplied in the asynchronous request.
void OnSetBlockedCompleted(IPump sender, bool success, object userToken);
///
/// Event invoked when a SetPriceGroup request has completed.
///
///
/// True if the request succeeded.
/// Token object that was supplied in the asynchronous request.
void OnSetPriceGroupCompleted(IPump sender, bool success, object userToken);
///
/// Event invoked when an Unreserve request has completed.
///
///
/// True if the request succeeded.
/// Token object that was supplied in the asynchronous request.
void OnUnreserveCompleted(IPump sender, bool success, object userToken);
///
/// Event invoked when an Authorize request has completed.
///
///
/// True if the request succeeded.
/// Unique Id that identifies the authorization. Used to match an authorization to its fuelling later.
/// Token object that was supplied in the asynchronous request.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Interoperability", "CA1406:AvoidInt64ArgumentsForVB6Clients")]
void OnAuthorizeCompleted(IPump sender, bool success, int authorizationId, object userToken);
///
/// Event invoked when an AuthorizeUpdate request has completed.
///
///
/// True if the request succeeded.
/// Token object that was supplied in the asynchronous request.
void OnAuthorizeUpdateCompleted(IPump sender, bool success, object userToken);
///
/// Event invoked when an Unauthorize request has completed.
///
///
/// True if the request succeeded.
/// Token object that was supplied in the asynchronous request.
void OnUnauthorizeCompleted(IPump sender, bool success, object userToken);
///
/// Event invoked when an SignalEvent request completed.
///
///
/// True if the request succeeded.
/// Token object that was supplied in the asynchronous request.
void OnSignalEventCompleted(IPump sender, bool success, object userToken);
#endregion
#region Unsolicited events
///
/// Event fired when the pump state has changed.
///
/// The object that fired the event.
/// The new pump state.
void OnStateChange(IPump sender, PumpState newPumpState);
///
/// Event fired when a nozzle state changes.
///
///
///
///
void OnNozzleStateChanged(IPump sender, INozzle nozzle, NozzleState newNozzleState);
///
/// Event fired when the fuelling data for a fuelling ( current fuelling ) changes.
///
/// Pump object that fired the event.
/// The fuelling which data changed.
/// The new amount.
/// The new quantity.
void OnFuellingDataChanged(IPump sender, IFuelling fuelling, [param: MarshalAs(UnmanagedType.Currency)] decimal amount, [param: MarshalAs(UnmanagedType.Currency)] decimal quantity);
///
/// Event fired when a fuelling's state has changed.
///
/// Pump object that fired the event.
/// The fuelling which state changed.
/// New state of the fuelling.
void OnFuellingStateChanged(IPump sender, IFuelling fuelling, FuellingState newState);
///
/// Event that is fired when a client has signalled an event using the SignalEventAsync method or from inside the forecourt
/// controller.
///
///
/// Type of the event that occured.
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Occured")]
void OnEventOccured(IPump sender, PumpEventType eventType);
#endregion
}
}