[2286] | 1 | /**********************************************************************
|
---|
| 2 | *
|
---|
| 3 | * startbrowser.h
|
---|
| 4 | * Copyright (C) 1999 The New Zealand Digital Library Project
|
---|
| 5 | *
|
---|
| 6 | * A component of the Greenstone digital library software
|
---|
| 7 | * from the New Zealand Digital Library Project at the
|
---|
| 8 | * University of Waikato, New Zealand.
|
---|
| 9 | *
|
---|
| 10 | * This program is free software; you can redistribute it and/or modify
|
---|
| 11 | * it under the terms of the GNU General Public License as published by
|
---|
| 12 | * the Free Software Foundation; either version 2 of the License, or
|
---|
| 13 | * (at your option) any later version.
|
---|
| 14 | *
|
---|
| 15 | * This program is distributed in the hope that it will be useful,
|
---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 18 | * GNU General Public License for more details.
|
---|
| 19 | *
|
---|
| 20 | * You should have received a copy of the GNU General Public License
|
---|
| 21 | * along with this program; if not, write to the Free Software
|
---|
| 22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 23 | *
|
---|
| 24 | *********************************************************************/
|
---|
| 25 |
|
---|
[611] | 26 | #define SB_NOERROR 0
|
---|
| 27 | #define SB_ALREADYINIT 1
|
---|
| 28 | #define SB_DDE_FAILINIT 2
|
---|
| 29 | #define SB_DDE_FAILDEINIT 3
|
---|
| 30 | #define SB_NOTINITED 4
|
---|
| 31 | #define SB_FAIL_BADFORMAT 5
|
---|
| 32 | #define SB_FAIL_NOTFOUND 6
|
---|
| 33 | #define SB_FAIL_NORESOURCES 7
|
---|
| 34 | #define SB_FAILCONNECTBROWSER 9
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 | extern int numbrowserstarted;
|
---|
| 38 |
|
---|
| 39 | // initstartbrowser should be called before startbrowser
|
---|
| 40 | //
|
---|
| 41 | // returns SB_NOERROR on success,
|
---|
| 42 | // SB_ALREADYINIT or SB_DDE_FAILINIT on failure
|
---|
| 43 | int initstartbrowser ();
|
---|
| 44 |
|
---|
| 45 | // returns SB_NOERROR on success,
|
---|
| 46 | // SB_DDE_FAILDEINIT of failure
|
---|
| 47 | int deinitstartbrowser ();
|
---|
| 48 |
|
---|
| 49 | // startbrowser will try to start a browser (or connect to a running browser).
|
---|
| 50 | //
|
---|
| 51 | // Returns SB_NOERROR on success,
|
---|
| 52 | // SB_NOTINITED, SB_FAIL_BADFORMAT, SB_FAIL_NOTFOUND, or SB_FAIL_NORESOURCES,
|
---|
| 53 | // on failure
|
---|
| 54 | int startbrowser (char *url, char *browser_exe, char *startdir);
|
---|
| 55 |
|
---|
| 56 | // returns SB_NOERROR on success,
|
---|
| 57 | // SB_NOTINITED, SB_FAILCONNECTBROWSER on failure
|
---|
| 58 | int browserrunning (char *browser_exe);
|
---|