Author: remi
Date: 2009-07-30 16:31:41 +0200 (Thu, 30 Jul 2009)
New Revision: 5243
Modified:
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.pas
Log:
* Added method to know if the user page is available on smart-server.
* Updated server start command to "smart_server_restart"
Modified:
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.pas
===================================================================
---
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.pas
2009-07-30 14:29:11 UTC (rev 5242)
+++
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.pas
2009-07-30 14:31:41 UTC (rev 5243)
@@ -10,6 +10,7 @@
function DownloadHTTP(const AUrl : string): string;
function getStates(var values : TStringList): boolean;
+ function userPageIsReady : boolean;
function isTuxDroidServerStarted() : boolean;
function KillServer(): Integer;
function isDongleConnected(states : TStringList) : boolean;
@@ -217,6 +218,25 @@
end;
+{#### Return if the user page is ready ####}
+function userPageIsReady : boolean;
+var
+ res : string;
+begin
+ res := TuxUtils.DownloadHTTP('http://127.0.0.1:270/user/');
+
+ if res <> '' then
+ begin
+ result := true;
+ end
+ else
+ begin
+ result := false;
+ end;
+
+end;
+
+
{#### Return the dongle state ####}
function isDongleConnected(states : TStringList) : boolean;
begin
@@ -314,7 +334,7 @@
else
begin
//Starting the server.
- ShellExecute(HWND(nil), 'open', PChar('smart_server_start'), nil, nil,
SW_HIDE);
+ ShellExecute(HWND(nil), 'open', PChar('smart_server_restart'), nil, nil,
SW_HIDE);
sleep(1000);
if TuxUtils.isTuxDroidServerStarted() and TuxUtils.getStates(temp) then
begin
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn