Delphi Conduit Library Help

Introduction

Main Index

General Info

TpfgPalmComponent

TpfgHotSyncActionDialog

TpfgPalmRemoteTable

TpfgPalmLocalTable

TpfgUserManager

TpfgPalmSyncComponent

TpfgPalmInstall

FAQ

  

Properties

ConduitName
ConduitVersion
CreatorFile
CreatorID
Directory
Information
Priority
Progress
RemoteFile

Methods

Log
DoRegisterConduit
DoUnregisterConduit

Events

OnConfigConduit
OnExecConduit
OnRegisterConduit
OnUnregisterConduit

TpfgPalmComponent

The new TpfgPalmComponent is a replacement for the old TpfgConduitRegister, TpfgConduitConfigure, and TpfgConduitExecute components. It provides services for registering a conduit, configuring it, and execution.

Registration
Provides a simplified method for the registration of a conduit to be integrated with the conduit itself, by implementing the standard registration/unregistration methods for ActiveX DLLs.

A conduit can thus be automatically made to register with compatible installer generators (such as Installshield), or can be manually installed with the command "regsvr32 conduit_dll.dll". The properties of the conduit can be set by filing out the properties of this component at design time.

Warning: The registration properties are used only when the conduit is first registered. You must thusly set the desired properties prior to your initial registration of the conduit, and take care to uninstall the conduit prior to making any changes to the properties.

Configuration
When a user clicks on the "Configure" button when a conduit is selected, the ConfigureConduit or CfgConduit method of the conduit is executed (depending on what version of the HotSync Manager is running). The conduit library provides implementations which pass the event in turn to the component's OnConfigConduit event.

A user does not necessarily need to provide an implementation for OnConfigConduit - if none is provided, then a default Hot Sync Action dialog is shown (provided by THotSyncActionDialog), with all four actions enabled.

Execution
When a conduit is called to execute, the OnExecConduit event of the component is called. A user should therefore attach their conduit execution code to it.

Properties

ConduitName
The name that appears in the list of conduits

ConduitVersion
The version of the conduit

CreatorFile
Optional file to specify the file changed records should be dumped into

CreatorID
Specifies the Creator ID of the Palm application that the conduit is synchronising for. An application with that same Creator ID must already exist on the Palm in order for the conduit to be executed.

Directory
Optional field specifying the directory name for placing files for the conduit in.

Information
Verbose description of the conduit

Priority
Specifies the priority of the conduit between 0 [high] and 3 [low], where 2 is standard priority.

Progress
The progress string that appears on the HotSync progress window. Setting this property at runtime changes the text on the window

RemoteFile
Specifies the remote file to use when a conduit is registered.

Methods

procedure Log(lStr: string = ''; Act: Activity = slText; TimeStamp: Boolean = False);
Acts as a wrapper around the HotSync LogString API function. When this method is called with a slSyncStarted constant, then the component ensures that a slSyncFinished log message is generated even if one isn't explicitly specified. It also traps any exceptions that fall through to the component, and generates a slSyncAborted message.

procedure DoRegisterConduit;
This method checks if there is any defined OnRegisterConduit event, and if so, then executes it

function DoUnregisterConduit: Boolean;
This method checks if there is any defined OnUnregisterConduit event, and if so, then executes it. Note that the boolean return indicates whether to remove folders or not.

Events

OnConfigConduit
This event gets called when the Configure button is pressed when the conduit is selected in the Custom list of the HotSync Manager. A sample implementation which makes use of the THotSyncActionDialog component is shown below:
      procedure TDataModule1.ConduitConfigure1ConfigConduit(var Data: TpfgCfgConduitInfo);
      begin
        case Data.syncTemporary of
          eFast, eSlow: HotSyncActionDialog1.ActionIndex := 0;
          ePCtoHH:      HotSyncActionDialog1.ActionIndex := 1;
          eHHtoPC:      HotSyncActionDialog1.ActionIndex := 2;
          eDoNothing:   HotSyncActionDialog1.ActionIndex := 3;
        end;

        if not HotSyncActionDialog1.Execute then Abort;

        { Save the selection }
        // Save the selection for temporary or permanent
        if HotSyncActionDialog1.SetAsDefault then
          Data.syncPref := ePermanentPreference
        else
          Data.syncPref := eTemporaryPreference;

        // Save the sync type
        case HotSyncActionDialog1.ActionIndex of
          0: Data.syncNew := eFast;
          1: Data.syncNew := ePCtoHH;
          2: Data.syncNew := eHHtoPC;
          3: Data.syncNew := eDoNothing;
        end;
      end;
      

OnExecConduit
This event is called when the conduit is executed. At this point, the Palm is available, and you can use either a palm remote table, or access the Palm Sync APIs directly.

OnRegisterConduit
This event is called when the conduit is being registered.

OnUnregisterConduit
This event is called when the conduit is being unregistered. It has a single Boolean parameter, RemoveDirs, which if set, causes the library to remove any folders for the conduit from any user subdirectories