Twain_DSM
1.0
|
Class to hold list of connected applications. More...
#include <dsm.h>
Public Member Functions | |
CTwnDsmApps () | |
The CTwnDsmApps constructor. More... | |
~CTwnDsmApps () | |
The CTwnDsmApps destructor. More... | |
TW_UINT16 | AddApp (TW_IDENTITY *_pAppId, TW_MEMREF _MemRef) |
Add an application. More... | |
TW_UINT16 | RemoveApp (TW_IDENTITY *_pAppId) |
Remove an application. More... | |
TW_INT16 | LoadDS (TW_IDENTITY *_pAppId, TWID_T _DsId) |
Loads a DS from disk and adds it to a global list of DS's. More... | |
void | UnloadDS (TW_IDENTITY *_pAppId, TWID_T _DsId) |
Unloads a DS and frees all its resources... More... | |
TW_BOOL | AppValidateId (TW_IDENTITY *_pAppId) |
Validate that an id is in range... More... | |
TW_BOOL | AppValidateIds (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDSId) |
Validate that the App ID and DS ID are in range... More... | |
TW_IDENTITY * | AppGetIdentity (TW_IDENTITY *_pAppId) |
Return a pointer to the application's identity. More... | |
TW_UINT16 | AppGetConditionCode (TW_IDENTITY *_pAppId) |
Get the condition code, then reset it internally to TWCC_SUCCESS, so you can only get it once, per the specification... More... | |
void | AppSetConditionCode (TW_IDENTITY *_pAppId, TW_UINT16 _conditioncode) |
Set the condition code. More... | |
DSM_State | AppGetState () |
Get the state of the DSM for all applications. More... | |
DSM_State | AppGetState (TW_IDENTITY *_pAppId) |
Get the state of the DSM for the specified application. More... | |
void * | AppHwnd (TW_IDENTITY *_pAppId) |
Get the hwnd sent in with the call to MSG_OPENDSM. More... | |
TWID_T | AppGetNumDs (TW_IDENTITY *_pAppId) |
Get the number of drivers we found as the result of a successful call to LoadDS with _boolKeepOpen set to false (meaning that we were just browsing)... More... | |
void | AppWakeup (TW_IDENTITY *_pAppId) |
Poke the application to wake it up when sending a DAT_NULL message to it... More... | |
TW_IDENTITY * | DsGetIdentity (TW_IDENTITY *_pAppId, TWID_T _DsId) |
Get a pointer to the identity of the specified driver... More... | |
DSENTRYPROC | DsGetEntryProc (TW_IDENTITY *_pAppId, TWID_T _DsId) |
Get a pointer to the DS_Entry function of the specified driver... More... | |
char * | DsGetPath (TW_IDENTITY *_pAppId, TWID_T _DsId) |
Get a pointer to the driver file path and name, which is guaranteed to be unique, even if the ProductName's aren't for some horrible reason... More... | |
TW_CALLBACK2 * | DsCallback2Get (TW_IDENTITY *_pAppId, TWID_T _DsId) |
Get a pointer to TW_CALLBACK structure for the specified driver... More... | |
TW_BOOL | DsCallbackIsWaiting (TW_IDENTITY *_pAppId, TWID_T _DsId) |
Test if the driver has a callback pending for attention... More... | |
void | DsCallbackSetWaiting (TW_IDENTITY *_pAppId, TWID_T _DsId, TW_BOOL _Waiting) |
Set the callback flag for the driver to TRUE if the callback needs to have its callback called, and set it to FALSE after the call has been made... More... | |
TW_BOOL | DsIsProcessingMessage (TW_IDENTITY *_pAppId, TWID_T _DsId) |
Check if the DS is still processing last message. More... | |
void | DsSetProcessingMessage (TW_IDENTITY *_pAppId, TWID_T _DsId, TW_BOOL _Processing) |
Set the ProcessingMessage flag. More... | |
TW_BOOL | DsIsAppProcessingCallback (TW_IDENTITY *_pAppId, TWID_T _DsId) |
Check if the App is still processing last callback. More... | |
void | DsSetAppProcessingCallback (TW_IDENTITY *_pAppId, TWID_T _DsId, TW_BOOL _Processing) |
Set the AppProcessingCallback flag. More... | |
TWID_T | AppGetNumApp () |
Get number of allocated App slots (Last valid App ID +1) More... | |
Private Attributes | |
CTwnDsmAppsImpl * | m_ptwndsmappsimpl |
The implementation pointer helps with encapulation. | |
Class to hold list of connected applications.
In 32bit enviroments each application will connect to a seperate instance of DSM data but with this list it allows ONE application to connect several time, as long as it uses a different name with each connection. I'm still not sure why you'd want to do that, but there it is. This class is intended to hide the gory details of how we're storing the data, so an impl is used.