Unit RbwInternetUtilities

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

RbwInternetUtilities provides a number of cross platform routines useful in accessing the internet.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EInternetConnectionError  

Functions and Procedures

function LaunchURL(var BrowserPath: string; const URL: string): boolean;
function DefaultBrowserPath: string;
procedure CloseBrowser(BrowserName: string);
function FileNameToURL(const FileName: string): string;
function FindFiles(const Path, Mask: string; IncludeSubDir: boolean; const Files: TStringList): integer;
function ReadInternetFile(const URL_String: string; const Lines: TStringList; const AppName: string): boolean;

Description

Functions and Procedures

function LaunchURL(var BrowserPath: string; const URL: string): boolean;

LaunchURL launches a web browser with the specified URL.

LaunchURL is slightly different under Linux and Windows

LINUX

Browser just needs to be the name of the web browser. The full path isn't required if the web browser is on the path. If no Browser is specified (Browser = ''), htmlview will be used which should start the default Browser.

Any of the following should work.

Launch('mozilla', 'http://www.kylix-patch.de.vu/'); Launch('konqueror', 'http://www.kylix-patch.de.vu/'); Launch('nautilus', 'http://www.kylix-patch.de.vu/'); Launch('galeon', 'http://www.kylix-patch.de.vu/'); Launch('netscape', 'http://www.kylix-patch.de.vu/'); Launch('htmlview', 'http://www.kylix-patch.de.vu/'); Launch('', 'http://www.kylix-patch.de.vu/');

WINDOWS

BrowserPath should either be the full path of the web browser or it should be '' to use the default web browser.

function DefaultBrowserPath: string;

DefaultBrowserPath returns the path for the default browser.

DefaultBrowserPath only works under Windows.

procedure CloseBrowser(BrowserName: string);

CloseBrowser is supposed to close a web browser but it is not reliable.

The call to the method must be accomplished with 'IExplore' for the Internet Explorer, 'Netscape' for the Netscape Communicator and 'Opera' for the Opera.

function FileNameToURL(const FileName: string): string;

FileNameToURL converts a local file name to a URL.

function FindFiles(const Path, Mask: string; IncludeSubDir: boolean; const Files: TStringList): integer;

FindFiles finds files specified by Mask in the directory specified by path.

The file names are added to Files. If IncludeSubDir is true, subdirectories of path will be searched too.

function ReadInternetFile(const URL_String: string; const Lines: TStringList; const AppName: string): boolean;

ReadInternetFile reads the file at the URL defined by URL_String and puts it contents in Lines.


Generated by PasDoc 0.12.1 on 2013-05-13 15:41:59