This appendix lists the classes and methods of and PeopleSoft.MCfgProxy.
PeopleSoft.MCfgProxy contains these methods.
Initiates the startup sequence of the Mobile Configurator application. Call this method right after MCfg object creation and before other methods are called on Mobile Configurator. By default the MCfg application window is shown centered and normal.
Arguments
None
Return Values
Type: Integer
0 – Successful
1 – Fail
Closes and shuts down the Mobile Configurator.
Arguments
None
Return Values
Type: Integer
0 – Successful
1 – Fail
Shows/Restores the Mobile Configurator application window if it was previously hidden on a Hide call.
Arguments
None
Return Values
Type: Integer
0 – Successful
1 – Fail
Hides the Mobile Configurator application.
Arguments
None
Return Values
Type: Integer
0 – Successful
1 – Fail
Loads/starts a new configuration session based on the passed configuration ID.
Arguments
sSolutionID – a string value for the solution ID to load, i.e. “Sample”, “TelcoHub” etc.
Return Values
Type: Integer
0 – Success
1 – Fail
Reloads/restarts a configuration session based on the previously saved configuration xml formatted record that is passed in.
Arguments
sXML – a string containing the xml formatted configuration record that is to be reloaded for reconfiguration.
Return Values
Type: Integer
0 – Success
1– Fail
Gets the state of the configuration session or how it ended (timeout). In doing so, the method waits for the configuration session to end before returning the exit state of the session.
Arguments
nTimeout—length of time in seconds.
Return Values
Type: Integer
0 – Success
1 – Fail
2 – Timeout
3 – Cancel
5 – Configuration Timer Timeout
Gets the state of the configuration session. In contrast to WaitForConfiguration, this method does not wait for the configuration session to end to send the state but returns it immediately.
Arguments
None
Return Values
Type: Integer
0 – Success
1 –Fail
3 –Cancel
4 – In Progress
5 – Configuration Timer Timeout
Retrieves the xml formatted configuration of the configuration session.
Arguments
None
Return Values
Type: String
The xml formatted string of the configuration.
Sets the specified label, which corresponds to the ID passed in, to the new label string passed in. The label is for the “Save” and “Cancel” menu items.
Arguments
NLabelID – ID of label whose string value is to be set .
Valid values are as follows:
0 – label for “Save”
1 – label for “Cancel”
NewLabel – string value that the label is to be set to.
Return Values
Type: Integer
0 – Success
1 – Fail
Initiates the countdown timers that set the maximum time duration for a configuration session.
Arguments
nCountdownTimeInMins—total length of time in minutes that the configuration can be worked on.
nWarnLeftTimeInMins—the time remaining in minutes that is left in the nCountdownTimeInMins argument, before a message appears to warn the user of the impending timeout, and to ask the user for a course of action (options are to Stop waiting for Mobile Configurator to return or to Continue to wait).
strWarnMessage—the message is displayed in the warning message dialog.
strContinueLabel—the string label for the button that is associated with the user choosing to continue with the configuration session.
StrStoplabel—the string label for the button that is associated with the user choosing to stop the configuration session and save it back to the order.
Return Values
Type: Integer
0 – Success
1 – Fail
Stops the countdown timers that were previously initiated with the startcountdown method.
Arguments
None
Return Values
Type: Integer
0 – Success
1 – Fail
The following is sample code included with the application.
Dim oMCfg As Object Set oMCfg = CreateObject("PeopleSoft.MCfgProxy") If (oMCfg.Start() = 1) Then MsgBox "Failed creating the configurator app" Set oMCfg = Nothing End End If oMCfg.Show oMCfg.StartCountdown(30, 10, "Config will timeout in 10 minutes!!", "Continue with session", "Save and return to order") oMCfg.NewConfiguration txtConfigID.Text Dim ret As Long 'timeout in 60 seconds ret = oMCfg.WaitForConfiguration(60) If (ret = 0) Then txtXML.Text = oMCfg.GetConfiguration() ElseIf (ret = 1) Then txtXML.Text = "Configuration failed" ElseIf (ret = 2) Then txtXML.Text = "Configuration timeout" ElseIf (ret = 3) Then txtXML.Text = "Configuration canceled by user" ElseIf (ret = 5) Then txtXML.Text = "Configuration timer timeout" End If oMCfg.StopCountdown oMCfg.Hide oMCfg.Stop Set oMCfg = Nothing