Introduction
General Info TpfgPalmComponent
|
Properties
ConduitName Methods
Log Events
OnConfigConduit |
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 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 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
PropertiesConduitNameThe name that appears in the list of conduits
ConduitVersion
CreatorFile
CreatorID
Directory
Information
Priority
Progress
RemoteFile
Methodsprocedure 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;
function DoUnregisterConduit: Boolean;
EventsOnConfigConduitThis 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
OnRegisterConduit
OnUnregisterConduit
|