Twain_DSM  1.0
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members

This is the main class for the Data Source Manager. More...

#include <dsm.h>

Collaboration diagram for CTwnDsm:
Collaboration graph
[legend]

Classes

struct  _pod
 We use a pod system because it help prevents us from making dumb initialization mistakes. More...
 

Public Member Functions

 CTwnDsm ()
 Our CTwnDsm constructor...
 
 ~CTwnDsm ()
 Our CTwnDsm destructor...
 
TW_UINT16 DSM_Entry (TW_IDENTITY *_pOrigin, TW_IDENTITY *_pDest, TW_UINT32 _DG, TW_UINT16 _DAT, TW_UINT16 _MSG, TW_MEMREF _pData)
 The guts of the DSM_Entry, the resource management portion resides in a our DSM_Entry entry point, which isn't a part of this class. More...
 
BOOL CALLBACK SelectDlgProc (HWND _hWnd, UINT _Message, WPARAM _wParam, LPARAM _lParam)
 Selection dialog, for apps that don't want to do GetFirst GetNext. More...
 
DSM_State DSMGetState ()
 Get the state of the DSM by checking the state of all applications. More...
 

Private Member Functions

TW_INT16 DSM_Null (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId, TW_UINT16 _MSG)
 Handles DAT_NULL calls from DS for Application. More...
 
TW_INT16 DSM_Status (TW_IDENTITY *_pAppId, TW_UINT16 _MSG, TW_STATUS *_pStatus)
 Returns the current DSM status. More...
 
TW_INT16 DSM_Parent (TW_IDENTITY *_pAppId, TW_UINT16 _MSG, TW_MEMREF _MemRef)
 Initializes or closes the DSM. More...
 
TW_INT16 DSM_Identity (TW_IDENTITY *_pAppId, TW_UINT16 _MSG, TW_IDENTITY *_pDsId)
 Source operations. More...
 
TW_INT16 DSM_TwunkIdentity (TW_IDENTITY *_pAppId, TW_UINT16 _MSG, TW_TWUNKIDENTITY *_pTwunkId)
 This routine will return the path to a DS. More...
 
TW_INT16 DSM_Entrypoint (TW_IDENTITY *_pAppId, TW_UINT16 _MSG, TW_ENTRYPOINT *_pEntrypoint)
 Gets entry points. More...
 
TW_INT16 DSM_Callback (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId, TW_UINT16 _MSG, TW_CALLBACK *_pData)
 Register application's callback. More...
 
TW_INT16 DSM_Callback2 (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId, TW_UINT16 _MSG, TW_CALLBACK2 *_pData)
 Register application's callback. More...
 
TW_INT16 OpenDS (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId)
 Opens the Data Source specified by pDSIdentity. More...
 
TW_INT16 CloseDS (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId)
 Closes the Data Source specified by pDSIdentity. More...
 
TW_INT16 DSM_SelectDS (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId)
 Displays the source select dialog and sets the default source. More...
 
TW_INT16 DSM_SetDefaultDS (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId)
 Set the default source. More...
 
TW_INT16 GetDSFromProductName (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId)
 Goes through the applications supported data sources looking for one that has the exact same name as product name in the passed in identity. More...
 
TW_INT16 DSM_GetFirst (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId)
 Copies the applications first available source into _pDsId. More...
 
TW_INT16 DSM_GetNext (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId)
 Copies the applications next available source into _pDsId. More...
 
TW_INT16 GetMatchingDefault (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId)
 This routine will check if the current default source matches the applications supported groups. More...
 
TW_INT16 GetIdentity (TW_IDENTITY *_pAppId, TW_IDENTITY *_pDsId)
 Return back the tw_identity of the current source. More...
 
bool printTripletsInfo (const TW_IDENTITY *_pOrigin, const TW_IDENTITY *_pDest, const TW_UINT32 _DG, const TW_UINT16 _DAT, const TW_UINT16 _MSG, const TW_MEMREF _pData)
 prints to stdout information about the triplets. More...
 
void printResults (const TW_UINT32 _DG, const TW_UINT16 _DAT, const TW_UINT16 _MSG, const TW_MEMREF _pData, const TW_UINT16 _RC)
 prints to stdout information about result of processing the triplets. More...
 
void StringFromMsg (char *_szMsg, const int _nChars, const TW_UINT16 _MSG)
 Translates the _MSG passed in into a string and returns it. More...
 
void StringFromDat (char *_szDat, const int _nChars, const TW_UINT16 _DAT)
 Translates the _DAT passed in into a string and returns it. More...
 
void StringFromDg (char *_szDg, const int _nChars, const TW_UINT32 _DG)
 Translates the _DG passed in into a string and returns it. More...
 
void StringFromCap (char *_szCap, const int _nChars, const TW_UINT16 _Cap)
 Translates the _Cap passed in into a string and returns it. More...
 
void StringFromConType (char *_szConType, const int _nChars, const TW_UINT16 _ConType)
 Translates the _ConType and _hContainer passed in into a string and returns it. More...
 
void StringFromRC (char *_szRc, const int _nChars, const TW_UINT16 _rc)
 Translates the rc passed in into a string and returns it. More...
 
void StringFromConditionCode (char *_szCondCode, const int _nChars, const TW_UINT16 _cc)
 Translates the Condition Code passed in into a string and returns it. More...
 

Private Attributes

struct CTwnDsm::_pod pod
 Pieces of Data for the DSM class.
 

Detailed Description

This is the main class for the Data Source Manager.

Unlike the other classes this one isn't using an impl interface. The rationale is that DSM_Entry is the true interface point, nobody who calls the DSM has to know anything about the implementation. So there's no benefit (except a programmer's desire for consistency) to putting in the impl. I'm resisting that on the theory that if I don't need it, why make things more complex. YMMV...

Definition at line 860 of file dsm.h.


The documentation for this class was generated from the following files: