|
SYNOPSIS Server Connection Management
SERVER *openserver(char *hostname,char *port)
SERVER *closeserver(SERVER *serverhandle)
int serveruser(char *username);
int servergroup(char *groupname);
int serverpass(char *password);
File list manipulation
str *n_getls(SERVER *se,str regexp)
str *n_setls(SERVER *se,str regexp)
str *n_putls(SERVER *se,str *flist)
Server operational modes
void n_synchronous(SERVER *se)
void n_asynchronous(SERVER *se)
Hit registration
int n_reghitcb(SERVER *se,void *usr,func cb)
func cb(void *usr,SRCH *sr,str url);
Hit information
XPMI *n_xpminfo(SERVER *se,SRCH *sr,int i);
XPMI *n_freexpmi(SERVER *se,XPMI *xi);
Query handling
SRCH *n_closesrch(SERVER *se,SRCH *sr)
SRCH *n_setqry(SERVER *se,str q)
int n_search(SERVER *se,SRCH *sr)
int n_regqryed(SERVER *se,void *usr,func cb)
func cb(void *usr,QRY *q);
Remote file manipulation
int n_rread(SERVER *se,RFILE *rf,char *buf,int n)
int n_rwrite(SERVER *se,RFILE *rf,char *buf,int n)
RFILE *n_closerfile(SERVER *se,RFILE *rf)
RFILE *n_openrfile(SERVER *se,str fn,str mode)
long n_rseek(SERVER *se,RFILE *rf,long off,int where)
Uniform Resource Locator handling
char *urltype(char *url)
char *urlhost(char *url)
char *urlport(char *url)
char *urluser(char *url)
char *urlgroup(char *url)
char *urlpass(char *url)
char *urlfn(char *url)
long *urloffs(char *url,int *n)
char *urlrest(char *url)
Metamorph control parameters
void n_setdefaults(SERVER *se)
int n_setsuffixproc(SERVER *se,int suffixproc)
int n_getsuffixproc(SERVER *se)
int n_setprefixproc(SERVER *se,int prefixproc)
int n_getprefixproc(SERVER *se)
int n_setrebuild(SERVER *se,int rebuild)
int n_getrebuild(SERVER *se)
int n_setincsd(SERVER *se,int incsd)
int n_getincsd(SERVER *se)
int n_setinced(SERVER *se,int inced)
int n_getinced(SERVER *se)
int n_setwithinproc(SERVER *se,int withinproc)
int n_getwithinproc(SERVER *se)
int n_setminwordlen(SERVER *se,int minwordlen)
int n_getminwordlen(SERVER *se)
int n_setintersects(SERVER *se,int intersects)
int n_getintersects(SERVER *se)
int n_setsdexp(SERVER *se,str sdexp)
str n_getsdexp(SERVER *se)
int n_setedexp(SERVER *se,str edexp)
str n_getedexp(SERVER *se)
int n_setsuffix(SERVER *se,str *suffix)
str *n_getsuffix(SERVER *se)
int n_setsuffixeq(SERVER *se,str *suffixeq)
str *n_getsuffixeq(SERVER *se)
int n_setprefix(SERVER *se,str *prefix)
str *n_getprefix(SERVER *se)
int n_setnoise(SERVER *se,str *noise)
str *n_getnoise(SERVER *se)
int n_seteqprefix(SERVER *se,str eqprefix)
str n_geteqprefix(SERVER *se)
int n_setueqprefix(SERVER *se,str ueqprefix)
str n_getueqprefix(SERVER *se)
int n_setsee(SERVER *se,int see)
int n_getsee(SERVER *se)
int n_setkeepeqvs(SERVER *se,int keepeqvs)
int n_getkeepeqvs(SERVER *se)
int n_setkeepnoise(SERVER *se,int keepnoise)
int n_getkeepnoise(SERVER *se)
DESCRIPTION The Network API accomplishes in a client-server fashion the intent of the
standard Thunderstone API. Because of several operational paridigm
differences however, we were forced into creating a completely new set of
functions rather than implementing a few additions to the existing API.
If you are writing a program that requires both standalone and
client-server modes of operation you should only use the client-server
functions, and then have the client software make server calls to the
same physical machine. In this way you can avoid needless replication
of work.
- Server Connection Management
-
These functions allow you to connect and disconnect from a server.
The return value from openserver() is a SERVER *, and
will be used as the first parameter in all subsequent calls to
the Server.
- File list manipulation
-
These functions provide the ability to perform remote file name list
manipulation. They are used to select or list the files names that will
be used in a search. Most of their abilities are derived by making
shell calls on the server to ls(1).
- Server operational modes
-
This pair of functions tells the server how to behave when calling
the client to give it information about a hit it has located.
The two modes are similar in meaning to the blocked VS unblocked
I/O modes.
- Hit registration
-
These functions tell the server which client function to "call back"
when it has located information pertinent to the query.
- Hit information
-
These functions allow you to obtain detailed information about any
search terms that may have used the approximate pattern matcher (XPM).
- Query handling
-
This group of operations is for passing a user's query onto the
server for processing and subsequently obtaining the results.
It also provides for editing the query after it has been parsed
but before the search is started.
- Remote file manipulation
-
The file manipulation functions perform remote versions of the
all too familiar open(3), close(3), read(3)
write(3) and seek(3) functions.
- Uniform Resource Locator handling
-
The URL handling functions are for parsing apart the results
passed to a client callback routine. ( Please see the URL
description section.)
- Metamorph control parameters
-
This set of functions is for getting and changing the various
operational parameters that define how a remote Metamorph performs.
SEE ALSO The Metamorph Operational and API Manual's
Copyright © Thunderstone Software Last updated: Sun Mar 17 21:14:49 EDT 2013
|