Class: |
DimBrowser |
Library: |
DIM |
|
Author: |
C. Gaspar |
|
Version: |
v1.0 |
Update : Tue
Aug 7 11:48:22 2007 |
Descrition :
To be used by DIM processes - implements DIM environment
browsing.
Allows Getting Information on Services, Servers
and Clients available.
Please refer to Usage
for examples
Public Functions :
-
int getServices ( char * wildcardServiceName);
// Check if a Service or Services (wildcards allowed) are available. Returns
the number of services/commands that match the search string. getNextService()
can be used to retrieve the individual services and their formats.
-
int getServers ( ); // Get the list of all
servers available in the system. Returns the number of servers. getNextServer()
can be used to retrieve the server names and nodes.
-
int getServerServices ( char * serverName);
// Get the list of all services provided by a server. Returns the number of
services provided by the server. getNextServerService() can be used to retrieve
the individual services and their formats.
-
int getServerClients ( char * serverName);
// Get the list of clients of a server. Returns the number of clients of
the specified server. getNextServerClient() can be used to retrieve the
individual client process names and nodes.
Methods for Decoding the information of
the above calls
-
int getNextService ( char * serviceName, char *format);
// can be called after a getServices( ) call. It will return the
type of the Service (DimSERVICE, DimCOMMAND or DimRPC) or 0 if no more
services. If successfull it will return the service name and its format.
The format is the one given to DimService, DimCommand or
DimRpc
-
int getNextServer (char *server, char *node );
// can be called after a getServers( ) call. It will return 1 while
there are servers in the list, 0 otherwise. If successfull it will return
the server name and the node where it runs.
-
int getNextServerService ( char *serviceName, char
*format); // can be called after a getServerServices( ) call.
It will return the type of the Service (DimSERVICE, DimCOMMAND or DimRPC)
or 0 if no more services. If successfull it will return the service name
and its format. The format is the one given to DimService,
DimCommand or DimRpc
-
int getNextServerClient ( char *clientName, char *node);
// can be called after a getServerClients( ) call. It will return
1 while there are clients in the list, 0 otherwise. If successfull it will
return the client name and the node where it runs.
Usage :
#include <dic.hxx>
main()
{
DimBrowser dbr;
char *server; *node, *service, *format;
int type;
dbr.getServers(
);
while(dbr.getNextServer(server, node))
{
cout << server << " @ " << node << endl;
dbr.getServerServices(server);
while(type = dbr.getNextServerService(service, format))
...
}
}
Or :
#include <dic.hxx>
main()
{
DimBrowser dbr;
char *service; *format;
int type;
dbr.getServices("*DELPHI/MUON*"
);
while(type = dbr.getNextService(service, format))
{
cout << service << " - " << format << endl;
...
}
}
Last update : 02/19/99 12:49:03 by MkHelp
1.1.0