2014-04-02 19:13:15 -04:00
|
|
|
|
using NTwain.Data;
|
2014-04-20 16:57:38 -04:00
|
|
|
|
using NTwain.Internals;
|
2014-04-02 19:01:21 -04:00
|
|
|
|
|
|
|
|
|
|
namespace NTwain.Triplets
|
|
|
|
|
|
{
|
2014-04-04 22:19:16 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Represents <see cref="DataArgumentType.StatusUtf8"/>.
|
|
|
|
|
|
/// </summary>
|
2014-05-22 21:05:28 -04:00
|
|
|
|
sealed class StatusUtf8 : OpBase
|
2014-04-02 19:01:21 -04:00
|
|
|
|
{
|
2014-04-20 18:42:51 -04:00
|
|
|
|
internal StatusUtf8(ITwainSessionInternal session) : base(session) { }
|
2014-05-20 07:25:57 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Translate the contents of a TW_STATUS structure received from the manager into a localized UTF-8
|
|
|
|
|
|
/// encoded string.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="status">The status.</param>
|
|
|
|
|
|
/// <returns></returns>
|
2014-05-22 21:05:28 -04:00
|
|
|
|
public ReturnCode GetManager(out TWStatusUtf8 status)
|
2014-05-20 07:25:57 -04:00
|
|
|
|
{
|
2014-05-22 21:05:28 -04:00
|
|
|
|
status = new TWStatusUtf8();
|
2014-05-20 07:25:57 -04:00
|
|
|
|
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.StatusUtf8, Message.Get);
|
|
|
|
|
|
return Dsm.DsmEntry(Session.AppId, null, Message.Get, status);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2014-04-02 19:01:21 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Translate the contents of a TW_STATUS structure received from a Source into a localized UTF-8
|
|
|
|
|
|
/// encoded string.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="status">The status.</param>
|
|
|
|
|
|
/// <returns></returns>
|
2014-05-22 21:05:28 -04:00
|
|
|
|
public ReturnCode GetSource(out TWStatusUtf8 status)
|
2014-04-02 19:01:21 -04:00
|
|
|
|
{
|
2014-05-22 21:05:28 -04:00
|
|
|
|
status = new TWStatusUtf8();
|
2014-04-02 19:01:21 -04:00
|
|
|
|
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.StatusUtf8, Message.Get);
|
2014-05-20 07:25:57 -04:00
|
|
|
|
return Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.Get, status);
|
2014-04-02 19:01:21 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|