GetInfo Method (CLIENT)


PLB Web Only, 9.7

 

The GetInfo method retrieves basic metadata about the current client UI being used for the execution of a PL/B program. The method uses the following format:

 

[label]

{object}.GetInfo

[GIVING {return}] USING [*Options=]{options}][:

 

 

{*Delimiter=]{delimiter}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A CLIENT object.

return

Optional. A Character String Variable that receives the CLIENT object metadata.

options

Required. A Numeric Variable or decimal number that specifies data to be returned.

delimiter

Optional. A Character String Variable or string literal defining the character that delimits the fields within the returned string.

Flags Affected: OVER, ZERO

Note the following:

  1. The ZERO flag is set when the {return} value is zero.

  2. The OVER flag is set if the value returned is too big to be stored into the {return} variable.

  3. This method returns the client UI metadata as a string of ASCII fields separated using a delimiter character.

  4. The default delimiter character is the 0x7F character. The DELIMITER keyword changes this character.

  5. The following metadata fields are expected for a PL/B Web Client:

  6.  

    Field

    Meaning

    availHeight

    The availHeight property returns the height of the user's screen, in pixels, minus interface features like the Windows Taskbar.

    availWidth

    The 'availWidth' property returns the width of the user's screen, in pixels, minus interface features like the Windows Taskbar.

    colorDepth

    The 'colorDepth' property returns the bit depth of the color palette for displaying images (in bits per pixel).

    height

    The 'height' property returns the total height of the user's screen, in pixels.

    pixelDepth

    The 'pixelDepth' property returns the color resolution (in bits per pixel) of the visitor's screen.

    width

    The 'width' property returns the total width of the user's screen, in pixels.

     

  7. The following metadata fields are expected for a Browser Navigator object:

  8.  

    Field

    Meaning

    appCodeName

    The 'appCodeName' property returns the code name of the browser. Note: All modern browsers returns "Mozilla", for compatibility reasons.

    appName

    The 'appName' property returns the name of the browser.

    appVersion

    The 'appVersion' property returns the version information of the browser.

    cookieEnabled

    The 'cookieEnabled' property returns a Boolean value that specifies whether cookies are enabled in the browser.

    language

    The 'language' property returns the language version of the browser.

    platform

    The 'platform' property returns for which platform the browser is compiled.

    product

    The 'product' property returns the engine (product) name of the browser. Note: This property may not work as expected. Both Gecko and WebKit browsers return "Gecko".

    userAgent

    The 'userAgent' property returns the value of the user-agent header sent by the browser to the server. The value returned, contains information about the name, version and platform of the browser.

     

  9. The following data fields provide information about the socket connection from the child task and the client browser as follows (9.7C):

  10.  

    Field

    Meaning

    PeerIP

    This field is the peer IP address of the client browser which is connected to the current PWS child task running the current PLB program.

    HttpHost

    This field is the Http Host request-header field that specifies the Internet host and port number found in the Http header as obtained from the original URL given at the client browser.

     

  11. The {options} parameter is a bit-mask value that allows one or more data fields to be retrieved. If the {options} parameter is not specified or it is specified with a value of zero, the 'GetInfo' method returns all of the available data fields with a delimiter character between the fields. If the {options} is specified with a non-zero value, the {options} is a bit-mask value where one or more data fields can be retrieved where the {options} bit-mask values are defined as follows:

  12.  

    Bit Mask

    Value

    Constant

    Returns ...

    0x0

    0

    $INFO_ALL

    all data fields with a delimiter character between the fields.

    0x1

    1

    $INFO_AVAIL_HEIGHT

    the field 'availHeight' data.

    0x2

    2

    $INFO_AVAIL_WIDTH

    the field 'availWidth' data.

    0x4

    4

    $INFO_COLOR_DEPTH

    the field 'colorDepth' data.

    0x8

    8

    $INFO_HEIGHT

    the field 'height' data.

    0x10

    16

    $INFO_PIXEL_DEPTH

    the field 'pixelDepth' data.

    0x20

    32

    $INFO_WIDTH

    the field 'width' data.

    0x40

    64

    $INFO_APP_CODE_NAME

    the field 'appCodeName' data.

    0x80

    128

    $INFO_APP_NAME

    the field 'appName' data.

    0x100

    256

    $INFO_APP_VERSION

    the field 'appVersion' data.

    0x200

    512

    $INFO_COOKIE_ENABLED

    the field 'cookieEnabled' data.

    0x400

    1024

    $INFO_LANGUAGE

    the field 'language' data.

    0x800

    2048

    $INFO_PLATFORM

    the field 'platform' data.

    0x1000

    4096

    $INFO_PRODUCT

    the field 'product' data.

    0x2000

    8192

    $INFO_USER_AGENT

    the field 'userAgent' data.

    0x4000

    16384

    $INFO_PEER_IP

    the field 'PeerIP' data.

    0x8000

    32768

    $INFO_HTTP_HOST

    the field 'HttpHost' data.

     

  13. This method is ignored if not using the PL/B Web Server.

 

 

See Also: CLIENT, Client Methods, Method Syntax

 



PL/B Language Reference FlushMessages Method (CLIENT) GetLocation Method (CLIENT)