IePadLS Interface Reference

List of all members.

Public Member Functions

HRESULT connGetDataRateIndex ([out, retval] BYTE *p_bRateIndex)
HRESULT connSetDataRateIndex ([in] BYTE bRateIndex)
HRESULT connSaveSettings ([out, retval] BYTE *p_bResultCode)
HRESULT connResetDefaults ([in] BYTE bResetCode)
HRESULT connGetSysCal ([out] SYSCAL *pSysCal)
HRESULT connSetSysCal ([in] SYSCAL *pSysCal)
HRESULT devHandleData ([in] BYTE bFlags,[in] USHORT wAbsX,[in] USHORT wAbsY,[in] USHORT bPress,[in] ULONG wTimestamp)
HRESULT connSetEncryptionMode ([in] BYTE bEncryptionMode)
HRESULT connGetEncryptionMode ([out] BYTE *p_bEncryptionMode)
HRESULT connDrawLine ([in] IDL_LINE_INFO *p_LineInfo)
HRESULT connGetInkingRegion ([out] PIDL_INK_REGION_DATA p_region)
HRESULT connSetInkingRegion ([in] PIDL_INK_REGION_DATA p_region)
HRESULT connCreateBitmap ([in] BYTE bBitmapId,[in] BYTE *pBuffer,[in] ULONG wBufferLength)
HRESULT connGetUserPreferences ([out] PIDL_USER_PREFERENCES pPreferences)
HRESULT connSetUserPreferences ([in] PIDL_USER_PREFERENCES pPreferences)
HRESULT connClrInkRegion ()
HRESULT devPadStackInfo ([out] INT8U fwVersion[8],[out] INT8U swVersion[8],[out] INT8U itoVersion[8])
HRESULT connCreateEmptyBitmap ([in] INT8U bBitmapId,[in] INT16U width,[in] INT16U height,[in] IDL_LCD_RGB color)
HRESULT connDeleteBitmap ([in] INT8U bBitmapId)
HRESULT connSetTextWindow ([in] IDL_LCD_POINT startingPoint,[in] INT16U width,[in] INT16U height,[in] IDL_UOM unitMeasure,[in] INT8U borderSize)
HRESULT connShowTextWindow ([in] INT8U bOnOff)
HRESULT connSendTextForTextWindow ([in] BSTR bStrTextBuffer)
HRESULT connSendAffirmationText ([in] BSTR bStrTextBuffer,[in] IDL_JUSTIFICATION horizJust,[in] IDL_JUSTIFICATION vertJust)
HRESULT connGetMode ([out] IDL_OP_MODE *pMode)
HRESULT ResetPad ([out] INT16U *pResult)
HRESULT connShowBitmap ([in] INT8U bBitmapId,[in] INT8U bOnOff)
HRESULT connSetBitmapAsDefault ([in] INT8U bBitmapId)
HRESULT connSendBitmapText ([in] INT8U bBitmapID,[in] BSTR bStrTextBuffer)
HRESULT connPositionBitmap ([in] INT8U bBitmapId,[in] INT16U xCoordinate,[in] INT16U yCoordinate)
HRESULT connGetCharacteristics ([out, retval] INT8U Features[6])


Detailed Description

Interface for ePad-LS client. Available debug properties:

Field NamePossible ValuesMeaning
exclusiveOpen[0|1]Set exclusive open property
(0 = NOT Exclusive Open, 1 = Exclusive Open)
Default is 1
legacymode[0|1]Set legacy open property - when opened in legacy mode, inking is enabled immediately, otherwise, inking must be explicitly turned on via the connSetInkingRegion function
(0 = NOT Legacy Open, 1 = Legacy Open)
Default is 1

All of the above fields are case-sensitive.

See also:
gIEDebugGUI::SetDebugParam

gIEDebugGUI::GetDebugParam


Member Function Documentation

HRESULT connGetDataRateIndex ( [out, retval] BYTE *  p_bRateIndex  ) 

Retrieves the device data report rate index from the ePad device.

Parameters:
p_bRateIndex Returned report rate can be any number within the range [1-4]. To determine the data report rate per second, multiply the bRateIndex value by 100.
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate

HRESULT connSetDataRateIndex ( [in] BYTE  bRateIndex  ) 

Sets the device data report rate index on the ePad device to a given value.

Parameters:
bRateIndex The desired report rate range within [1-4]. The pRateIndex value represents the desired data report rate per second divided by 100. The default value is 2.
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate

HRESULT connSaveSettings ( [out, retval] BYTE *  p_bResultCode  ) 

Saves all current values for persistent settings as the default.

If the client program has changed the device pen data report rate, LCD backlight, signature inking region, or calibration settings, it can call this method to keep the changes as device defaults.

Parameters:
p_bResultCode The returned error code indicate an error occured when saving settings. 0 means no error encountered.
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate

HRESULT connResetDefaults ( [in] BYTE  bResetCode  ) 

Resets the device's calibration and options to the powerup state.

Parameters:
bResetCode The values to set to default. The following individual bits should be set to 1 in order to cause the corresponding action(s). Bit 2 determines if factory or tuned settings should be used (1 = factory; 0 = tuned).

Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL

HRESULT connGetSysCal ( [out] SYSCAL pSysCal  ) 

Retrieves the current calibration settings from the device.

Parameters:
pSysCal Points to the address of the desired system calibration settings
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate
See also:
SYSCAL

HRESULT connSetSysCal ( [in] SYSCAL pSysCal  ) 

Writes device calibration settings to the device.

Parameters:
pSysCal Points to the address to accept the system calibration settings.
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate
See also:
SYSCAL

HRESULT devHandleData ( [in] BYTE  bFlags,
[in] USHORT  wAbsX,
[in] USHORT  wAbsY,
[in] USHORT  bPress,
[in] ULONG  wTimestamp 
)

Pen-data handling routine - reserved for internal use.
This function is used to obtain unsolicited data from the ePad. It will reformat the data and call the registered data-handling routine.

Parameters:
bFlags Data flags, includes pen-down indicator (among others)
wAbsX X-axis position
wAbsY Y-axis position
bPress Pressure value
wTimestamp Relative timestamp value (1/1200 of a second)
Returns:
  • S_OK - Function always returns OK

HRESULT connSetEncryptionMode ( [in] BYTE  bEncryptionMode  ) 

Sets the device data encryption mode on the device.

Parameters:
bEncryptionMode The encryption enumerator to indicate the desired encryption type
  • ENCRYPTION_NONE (0) - Encryption off
  • ENCRYPTION_AES256_ECB (1) - 256 bits AES encryption(Default)
For more information, please refer to the OpenSSL library

Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate
  • E_ABORT - The basic function doesn't work.
  • E_OUTOFMEMORY - Failed to create BIO file--the OpenSSL I/O entry for digital certificate.
  • CO_E_CANT_REMOTE - Couldn't create remote PEM session--The device failed to send out neccessary data to setup the secure channel.

HRESULT connGetEncryptionMode ( [out] BYTE *  p_bEncryptionMode  ) 

Gets the data encryption mode from the ePad device.

Parameters:
p_bEncryptionMode Points the address to accept the encryption type enumerator. See notes on the SetEncryptionMode section.
Returns:
  • S_OK - Done
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate

HRESULT connDrawLine ( [in] IDL_LINE_INFO p_LineInfo  ) 

Draws a line on the specified screen id using the given color and width between starting point and end point.

Parameters:
p_LineInfo The desired line properties
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate
See also:
IDL_LINE_INFO

HRESULT connGetInkingRegion ( [out] PIDL_INK_REGION_DATA  p_region  ) 

Gets the inking region settings from the device. The inking region is a region in the LCD that auto inking occurs in.

Parameters:
p_region Points to the address to accept inking region settings
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate
See also:
IDL_INK_REGION_DATA

HRESULT connSetInkingRegion ( [in] PIDL_INK_REGION_DATA  p_region  ) 

Sets the inking region settings on the device. Note that once the ink region is enabled, the device is put in INKING mode and will subsequently respond to a restricted subset of commands. Once the signature capture is complete, one should re-issue this method in order to disable the ink region.

Parameters:
p_region pointer to inking region settings
See also:
IDL_INK_REGION_DATA
The follwoing code snippet shows how to disable ink region

IDL_INK_REGION_DATA inkRegionData; HRESULT hr = p_epadHancock->connGetInkingRegion(&inkRegionData); if (SUCCEEDED(hr)) { Disable the inking region inkRegionData.bEnabled = 0; hr = p_epadHancock->connSetInkingRegion(&inkRegionData); }

Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate
See also:
IDL_INK_REGION_DATA

HRESULT connCreateBitmap ( [in] BYTE  bBitmapId,
[in] BYTE *  pBuffer,
[in] ULONG  wBufferLength 
)

Creates bitmap on the specified screen (bitmapid) using given buffer. Currently only BMP and JPEG format images are supported by the device. The buffer length can not greater than 1MB.

Parameters:
bBitmapId The desired image ID
pBuffer Pointer to the image buffer containing the BMP or JPEG data
wBufferLength The image buffer length
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate
  • E_UNEXPECTED - Failed to create temporary file on device
  • E_OUTOFMEMORY - Failed during file transfer
  • E_ABORT - Failed to execute the image file

HRESULT connGetUserPreferences ( [out] PIDL_USER_PREFERENCES  pPreferences  ) 

Gets the user-defined settings from the ePad device. As of the writing of this document, screen saver functions have not been implemented.

Parameters:
pPreferences Points to the address to accept the user-defined settings.
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate
See also:
IDL_USER_PREFERENCES

HRESULT connSetUserPreferences ( [in] PIDL_USER_PREFERENCES  pPreferences  ) 

Sets the user-defined settings for the ePad device. <<<<<<< .mine ======= Currently, only the bEncryption in the user_preferences is implemented. >>>>>>> .r9804

Parameters:
pPreferences Points to the address holding the desired user-defined settings
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameter pPreferences is NULL or the value of its member bEncryptionType is not in ENCRYPTION_TYPE.
See also:
IDL_USER_PREFERENCES

ENCRYPTION_TYPE

HRESULT connClrInkRegion (  ) 

Clears the inking region (removes any ink trails from region). This is used to remove the signature from the ePad screen at the end of a signing event.

Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL

HRESULT devPadStackInfo ( [out] INT8U  fwVersion[8],
[out] INT8U  swVersion[8],
[out] INT8U  itoVersion[8] 
)

Return the versions for PIC firmware, Linux ito device driver, and pad daemon

Returns:
  • S_OK - Done
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL

HRESULT connCreateEmptyBitmap ( [in] INT8U  bBitmapId,
[in] INT16U  width,
[in] INT16U  height,
[in] IDL_LCD_RGB  color 
)

Creates an empty bitmap with the specified bBitmapId. The width and height must be indicated and are in pixels. The background color is indicated using a IDL_LCD_RGB structure.

Parameters:
bBitmapId The desired image ID. The bBitmapId field must be > 0 and <= 254. The bitmapid 255 is reserved for internal use only.
width Image width in pixel
height Image height in pixel
color Image color
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
See also:
IDL_LCD_RGB

HRESULT connDeleteBitmap ( [in] INT8U  bBitmapId  ) 

Deletes the specified bBitmapId from the ePad device. This function is required to close the bitmap which was open by connCreateEmptyBitmap() or connCreateBitmap().

Parameters:
bBitmapId To be deleted image ID. The bBitmapId field must be > 0 and <= 254. The bitmapid 255 is reserved for internal use only.
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL

HRESULT connSetTextWindow ( [in] IDL_LCD_POINT  startingPoint,
[in] INT16U  width,
[in] INT16U  height,
[in] IDL_UOM  unitMeasure,
[in] INT8U  borderSize 
)

Sets the text window settings on the device. This identifies what will appear on the LCD display after the connShowTextWindow() call. If the text window is too small to display the text that is provided, then a vertical scroll-bar is automatically provided on the LCD display. This scroll-bar can be manipulated with the stylus in order to allow the viewer to review the entire complement of text which has been provided.

This method only changes the text window settings. It doesn't automatically show the text window. The client program should access method connShowTextWindow(...) to show or hide the text window.

Parameters:
startingPoint The window's top left position
width Window's width
height Window's height
unitMeasure The window sizing measurement
borderSize The window border size
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate
See also:
IDL_UOM

HRESULT connShowTextWindow ( [in] INT8U  bOnOff  ) 

Show or hide the text window. This command applies to the window previously set by the connSetTextWindow method. The sequence to build and show a text winidow is:

hr = pView->m_pePadHancock->connSetTextWindow(startingPoint, 320, 240, 0, 0); if ( FAILED(hr) ) { MessageBox("Failed to setup the text window on device.\n", "Error", MB_OK|MB_SYSTEMMODAL); } hr = pView->m_pePadHancock->connSendTextForTextWindow(bstrText); hr = pView->m_pePadHancock->connShowTextWindow(1); if ( FAILED(hr) ) { strMsg.Format("Failed to send [%s].\n", bstrText); MessageBox(strMsg, "Error", MB_OK|MB_SYSTEMMODAL); }

Parameters:
bOnOff The flag to show/hide the desired text window. 1 shows the text window; 0 hides the text window
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
See also:
connSendTextForTextWindow, connShowTextWindow

HRESULT connSendTextForTextWindow ( [in] BSTR  bStrTextBuffer  ) 

Sends the richtext text to the previously defined text window by the connSetTextWindow method.

Parameters:
bStrTextBuffer The desired richtext text
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_OUTOFMEMORY - The text is over 64K
See also:
connSetTextWindow, connShowTextWindow

HRESULT connSendAffirmationText ( [in] BSTR  bStrTextBuffer,
[in] IDL_JUSTIFICATION  horizJust,
[in] IDL_JUSTIFICATION  vertJust 
)

Sends the text to the previous defined inking region on the ePad device.

The client program can access the method connSetInkingRegion(...) to setup the ink region to capture signure. Once the ink region has been defined, the client can access this method to display the text over the ink region.

Parameters:
bStrTextBuffer The affirmation text
horizJust Horizontal aligement
vertJust Vertical aligement
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_OUTOFMEMORY - The affirmation text is too long
See also:
IDL_JUSTIFICATION

HRESULT connGetMode ( [out] IDL_OP_MODE pMode  ) 

Query the operational mode of the ePad device.

Parameters:
pMode The returned op mode Return values are:
/The device is not yet completed its Startup so is not reached an operational state. DEVICE_STARTUP = 1, /The device can receive/send any commands. Issuing a SetInkRegion command with bEnable=1 will change the mode to DEVICE_INKING. DEVICE_READY, /The device can send padData and accept limited commands, such as SetInkRegion and CloseConnection. /Issue a SetInkRegion with bEnable=0 to change the mode to DEVICE_READY. DEVICE_INKING, /The device fails to work and the application needs to issue a reset command. DEVICE_ERROR,

Returns:
  • S_OK - Done
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalidate
See also:
IDL_OP_MODE

HRESULT ResetPad ( [out] INT16U pResult  ) 

Reset the device to READY status. Once reset, the ePad should be ready to accept HID reports and the encryption mode should be off. The closeConnection will call this function to reset the device to be ready mode.

Parameters:
pResult Accept the result code from FW. 0 means FW has been successfully reset; non-0 means error occurs when FW resetting
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_INVALIDARG - The parameters are invalid
See also:
IDL_OP_MODE

HRESULT connShowBitmap ( [in] INT8U  bBitmapId,
[in] INT8U  bOnOff 
)

Show or hide the designated bitmap on the ePad LCD screen.

Parameters:
bBitmapId The designated image ID
bOnOff The flag to indicate whether to show/hide the target image. 1 shows the target image; 0 hides the target image.
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL

HRESULT connSetBitmapAsDefault ( [in] INT8U  bBitmapId  ) 

Set the bitmap to be the default background image that shows up as device LCD background image when the device is opened (via method OpenConnection(...)).

The client program can send an image to the device and then access this method to set it as defalult background image.

To send an image to device, please refer the method connCreateEmptyBitmap(..), and connCreateBitmap(...).

Parameters:
bBitmapId The desired image ID
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL

HRESULT connSendBitmapText ( [in] INT8U  bBitmapID,
[in] BSTR  bStrTextBuffer 
)

Display a text string over the specified bitmap. One use for this text is to display affirmation text.

Parameters:
bBitmapID The destination bitmap ID
bStrTextBuffer The desired text to display
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL
  • E_OUTOFMEMORY - The desried image it too large (over 3MB)

HRESULT connPositionBitmap ( [in] INT8U  bBitmapId,
[in] INT16U  xCoordinate,
[in] INT16U  yCoordinate 
)

Position the designated image at the desired LCD positon.

Parameters:
bBitmapId The designated image ID
xCoordinate The desired LCD x-coordinate
yCoordinate The desired LCD y-coordinate
Returns:
  • S_OK - Done
  • E_ACCESSDENIED - The device is not ready to accept the report
  • E_FAIL - Failed to call underneath I/O API
  • E_HANDLE - The ePad device handle is NULL

HRESULT connGetCharacteristics ( [out, retval] INT8U  Features[6]  ) 

Get the device characteristics/features. 5-wire device has durable ITO. 4-wire has meaningful pressure report.

Parameters:
Features 6 bytes data as follows: -1st byte: -0 = 5-wire device -1 = 4-wire device -2 = touch-pad error(Unknown ito type) -2nd-6th bytes: -Reserved
Returns:
  • S_OK - Done
  • E_HANDLE - The ePad device handle is NULL


Generated on Mon Dec 17 17:19:32 2007 for ePadAPIs by  doxygen 1.5.4