using NTwain.Data;
using NTwain.Triplets;
using System;
namespace NTwain
{
///
/// Interface for TWAIN triplet operations.
///
public interface ITwainOperation
{
///
/// Gets the triplet operations defined for audio data group.
///
DGAudio DGAudio { get; }
///
/// Gets the triplet operations defined for control data group.
///
DGControl DGControl { get; }
///
/// Gets the triplet operations defined for image data group.
///
DGImage DGImage { get; }
///
/// Opens the data source manager. This must be the first method used
/// before using other TWAIN functions. Calls to this must be followed by when done with a TWAIN session.
///
///
ReturnCode OpenManager();
///
/// Closes the data source manager.
///
///
ReturnCode CloseManager();
///
/// Loads the specified source into main memory and causes its initialization.
/// Calls to this must be followed by
/// when not using it anymore.
///
/// Name of the source.
///
ReturnCode OpenSource(string sourceProductName);
///
/// When an application is finished with a Source, it must formally close the session between them
/// using this operation. This is necessary in case the Source only supports connection with a single
/// application (many desktop scanners will behave this way). A Source such as this cannot be
/// accessed by other applications until its current session is terminated
///
///
ReturnCode CloseSource();
///
/// Enables the source to start transferring.
///
/// The mode.
/// if set to true any driver UI will display as modal.
/// The window handle if modal.
///
ReturnCode EnableSource(SourceEnableMode mode, bool modal, IntPtr windowHandle);
///
/// Forces the stepping down of an opened source when things gets out of control.
/// Used when session state and source state become out of sync.
///
/// State of the target.
void ForceStepDown(int targetState);
}
}