ePages 6.10 - DE_EPAGES/WebInterface/API/Config.pm

Package DE_EPAGES::WebInterface::API::Config

This module contains all functions needed to perform the communication with the web interface.

@EXPORT_OK
WebInterfaceConfig
WebInterfaceConfigSectionIsHost
GetMessageCenter
GetMessageCenters
GetRequestRouterMonitors
IsCookieAllowed
GetAllowedCookies
IsClientAllowed

Functions

GetAllowedCookies
GetMessageCenter
GetMessageCenters
GetRequestRouterMonitors
IsClientAllowed
IsCookieAllowed
WebInterfaceConfig
WebInterfaceConfigSectionIsHost

GetAllowedCookies

Read the WebInterface.conf and find COOKIES at GLOBAL section.

Syntax
@CookieNames = GetAllowedCookies();
Return
@CookieNames (array.string)
allowed cookies

GetMessageCenter

Read the WebInterface.conf and find my MessageCenter Ip and port.

Syntax
($MCIPAddress, $MCPort) = GetMessageCenter($IPAddress);
Input
$IPAddress (string)
script or application server IP address (optional)
Return
$MCIPAddress (string)
MessageCenter host IP address
$MCPort (integer)
MessageCenter port

GetMessageCenters

Read the WebInterface.conf and find all MessageCenter Ip and port.

Syntax
$aMCs = GetMessageCenters();
Return
$aMCs (ref.array.array.string)
MessageCenters IP addresses and port numbers
[ [ IP, port ], [IP, port ], ... ]

GetRequestRouterMonitors

Read the WebInterface.conf and find all RequestRouter IP addresses and monitor ports.

Syntax
$aMonitors = GetMessageCenters();
Return
$aMCs (ref.array.array.string)
RequestRouter IP addresses and monitor port numbers
[ [ IP, port ], [IP, port ], ... ]

IsClientAllowed

Read the WebInterface.conf and look if client of ip is allowed to connect.

Syntax
$IsAllowed = IsClientAllowed($IPAddress);
Input
$IPAddress (string)
ip address
Return
$IsAllowed (boolean)
is cookie allowed

IsCookieAllowed

Read the WebInterface.conf and find COOKIES at GLOBAL section, look if cookie name exists in comma separated list.

Syntax
$IsAllowed = IsCookieAllowed($CookieName);
$IsAllowed = IsCookieAllowed('SessionID');
Input
$CookieName (string)
key of cookie
Return
$IsAllowed (boolean)
is cookie allowed

WebInterfaceConfig

get ini object of the WebInterface.conf

Syntax
$IniConfig = WebInterfaceConfig();
Return
$IniConfig (object)
config object

WebInterfaceConfigSectionIsHost

checks if WebInterface.conf section is a hostname/ip address

Syntax
$IsHost = WebInterfaceConfigSectionIsHost($Section);
Input
$Section (string)
section name in WebInterface.conf
Return
$IsHost (integer)
true or false