mirror of
https://github.com/soukoku/ntwain.git
synced 2025-11-25 18:00:27 +08:00
Refactoring xfer logic from twainsession out.
This commit is contained in:
@@ -5,7 +5,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
sealed class Callback : OpBase
|
||||
{
|
||||
internal Callback(ITwainStateInternal session) : base(session) { }
|
||||
internal Callback(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// This triplet is sent to the DSM by the Application to register the application’s entry point with
|
||||
/// the DSM, so that the DSM can use callbacks to inform the application of events generated by the
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
sealed class Callback2 : OpBase
|
||||
{
|
||||
internal Callback2(ITwainStateInternal session) : base(session) { }
|
||||
internal Callback2(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// This triplet is sent to the DSM by the Application to register the application’s entry point with
|
||||
/// the DSM, so that the DSM can use callbacks to inform the application of events generated by the
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class Capability : OpBase
|
||||
{
|
||||
internal Capability(ITwainStateInternal session) : base(session) { }
|
||||
internal Capability(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// Returns the Source’s Current, Default and Available Values for a specified capability.
|
||||
/// </summary>
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class CustomDSData : OpBase
|
||||
{
|
||||
internal CustomDSData(ITwainStateInternal session) : base(session) { }
|
||||
internal CustomDSData(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// This operation is used by the application to query the data source for its current settings, e.g.
|
||||
/// DPI, paper size, color format. The actual format of the data is data source dependent and not
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class DeviceEvent : OpBase
|
||||
{
|
||||
internal DeviceEvent(ITwainStateInternal session) : base(session) { }
|
||||
internal DeviceEvent(ITwainSessionInternal session) : base(session) { }
|
||||
public ReturnCode Get(out TWDeviceEvent sourceDeviceEvent)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.DeviceEvent, Message.Get);
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
sealed class EntryPoint : OpBase
|
||||
{
|
||||
internal EntryPoint(ITwainStateInternal session) : base(session) { }
|
||||
internal EntryPoint(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// Gets the function entry points for twain 2.0 or higher.
|
||||
/// </summary>
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
sealed class Event : OpBase
|
||||
{
|
||||
internal Event(ITwainStateInternal session) : base(session) { }
|
||||
internal Event(ITwainSessionInternal session) : base(session) { }
|
||||
|
||||
/// <summary>
|
||||
/// This operation supports the distribution of events from the application to Sources so that the
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class FileSystem : OpBase
|
||||
{
|
||||
internal FileSystem(ITwainStateInternal session) : base(session) { }
|
||||
internal FileSystem(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// This operation selects the destination directory within the Source (camera, storage, etc), where
|
||||
/// images captured using CapAutomaticCapture will be stored. This command only selects
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class Identity : OpBase
|
||||
{
|
||||
internal Identity(ITwainStateInternal session) : base(session) { }
|
||||
internal Identity(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// 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
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
sealed class Parent : OpBase
|
||||
{
|
||||
internal Parent(ITwainStateInternal session) : base(session) { }
|
||||
internal Parent(ITwainSessionInternal session) : base(session) { }
|
||||
|
||||
/// <summary>
|
||||
/// When the application has closed all the Sources it had previously opened, and is finished with
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class PassThru : OpBase
|
||||
{
|
||||
internal PassThru(ITwainStateInternal session) : base(session) { }
|
||||
internal PassThru(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// PASSTHRU is intended for the use of Source writers writing diagnostic applications. It allows
|
||||
/// raw communication with the currently selected device in the Source.
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
sealed class PendingXfers : OpBase
|
||||
{
|
||||
internal PendingXfers(ITwainStateInternal session) : base(session) { }
|
||||
internal PendingXfers(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// This triplet is used to cancel or terminate a transfer. Issued in state 6, this triplet cancels the next
|
||||
/// pending transfer, discards the transfer data, and decrements the pending transfers count. In
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class SetupFileXfer : OpBase
|
||||
{
|
||||
internal SetupFileXfer(ITwainStateInternal session) : base(session) { }
|
||||
internal SetupFileXfer(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// Returns information about the file into which the Source has or will put the acquired image
|
||||
/// or audio data.
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class SetupMemXfer : OpBase
|
||||
{
|
||||
internal SetupMemXfer(ITwainStateInternal session) : base(session) { }
|
||||
internal SetupMemXfer(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// Returns the Source’s preferred, minimum, and maximum allocation sizes for transfer memory
|
||||
/// buffers.
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class Status : OpBase
|
||||
{
|
||||
internal Status(ITwainStateInternal session) : base(session) { }
|
||||
internal Status(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// Returns the current Condition Code for the Source Manager.
|
||||
/// </summary>
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class StatusUtf8 : OpBase
|
||||
{
|
||||
internal StatusUtf8(ITwainStateInternal session) : base(session) { }
|
||||
internal StatusUtf8(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// Translate the contents of a TW_STATUS structure received from a Source into a localized UTF-8
|
||||
/// encoded string.
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
sealed class UserInterface : OpBase
|
||||
{
|
||||
internal UserInterface(ITwainStateInternal session) : base(session) { }
|
||||
internal UserInterface(ITwainSessionInternal session) : base(session) { }
|
||||
/// <summary>
|
||||
/// This operation causes the Source’s user interface, if displayed during the
|
||||
/// EnableDS operation, to be lowered. The Source is returned to
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class XferGroup : OpBase
|
||||
{
|
||||
internal XferGroup(ITwainStateInternal session) : base(session) { }
|
||||
internal XferGroup(ITwainSessionInternal session) : base(session) { }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Data Group (the type of data) for the upcoming transfer. The Source is required to
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
public sealed class DGControl
|
||||
{
|
||||
ITwainStateInternal _session;
|
||||
internal DGControl(ITwainStateInternal session)
|
||||
ITwainSessionInternal _session;
|
||||
internal DGControl(ITwainSessionInternal session)
|
||||
{
|
||||
if (session == null) { throw new ArgumentNullException("session"); }
|
||||
_session = session;
|
||||
|
||||
Reference in New Issue
Block a user