version 1.2, 2003/10/22 14:26:01
|
version 1.3, 2004/09/08 13:58:22
|
|
|
| |
#include "CIMServerDiscovery.h" | #include "CIMServerDiscovery.h" |
| |
|
#include <string.h> // for strdup |
|
|
|
PEGASUS_NAMESPACE_BEGIN |
|
///////////////////////////////////////////////////////////////////////////// |
|
// SLPClientOptions |
|
// Filthy hack. User is responsible for adjusting values, |
|
// and for new/delete of any struct used |
|
///////////////////////////////////////////////////////////////////////////// |
|
SLPClientOptions::SLPClientOptions(){ |
|
//initialise everything |
|
target_address = NULL; |
|
local_interface = NULL; |
|
target_port = 427; |
|
spi = NULL; |
|
scopes = strdup("DEFAULT"); |
|
service_type = strdup("service:wbem"); |
|
predicate = NULL; |
|
use_directory_agent = false; |
|
} |
|
SLPClientOptions::~SLPClientOptions(){ |
|
// free all pointers |
|
free(target_address); |
|
free(local_interface); |
|
free(spi); |
|
free(scopes); |
|
free(service_type); |
|
free(predicate); |
|
} |
|
void SLPClientOptions::print() const{ |
|
printf("target_address %s\n",target_address!=NULL?target_address:"NULL"); |
|
printf("local_interface %s\n",local_interface!=NULL?local_interface:"NULL"); |
|
printf("target_port %d\n",target_port); |
|
printf("spi %s\n",spi!=NULL?spi:"NULL"); |
|
printf("scopes %s\n",scopes!=NULL?scopes:"NULL"); |
|
printf("service_type %s\n",service_type!=NULL?service_type:"NULL"); |
|
printf("predicate %s\n",predicate!=NULL?predicate:"NULL"); |
|
printf("use_directory_agent %d\n",use_directory_agent==0?"false":"true"); |
|
} |
|
|
|
|
|
PEGASUS_NAMESPACE_END |
|
|
#ifdef PEGASUS_SLP_CLIENT_INTERFACE_WRAPPER | #ifdef PEGASUS_SLP_CLIENT_INTERFACE_WRAPPER |
# include "PegasusSLPWrapper.cpp" | # include "PegasusSLPWrapper.cpp" |
#elif OPENSLP_SLP_CLIENT_INTERFACE_WRAPPER | #elif OPENSLP_SLP_CLIENT_INTERFACE_WRAPPER |
|
|
#else | #else |
// No interface wrapper selected | // No interface wrapper selected |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
|
///////////////////////////////////////////////////////////////////////////// |
|
// CIMServerDiscoveryRep |
|
///////////////////////////////////////////////////////////////////////////// |
CIMServerDiscoveryRep::CIMServerDiscoveryRep() | CIMServerDiscoveryRep::CIMServerDiscoveryRep() |
{ | { |
} | } |
|
|
} | } |
| |
Array<CIMServerDescription> | Array<CIMServerDescription> |
CIMServerDiscoveryRep::lookup(const Array<Attribute> & criteria) |
CIMServerDiscoveryRep::lookup(const Array<Attribute> & criteria, const SLPClientOptions* options) |
{ | { |
Array<CIMServerDescription> connections; | Array<CIMServerDescription> connections; |
return connections; | return connections; |
|
|
} | } |
| |
Array<CIMServerDescription> | Array<CIMServerDescription> |
CIMServerDiscovery::lookup() |
CIMServerDiscovery::lookup(const SLPClientOptions* options) |
{ | { |
Array<Attribute> criteria; | Array<Attribute> criteria; |
return _rep->lookup(criteria); |
return _rep->lookup(criteria,options); |
} | } |
| |
Array<CIMServerDescription> | Array<CIMServerDescription> |
CIMServerDiscovery::lookup(const Array<Attribute> & criteria) |
CIMServerDiscovery::lookup(const Array<Attribute> & criteria, const SLPClientOptions* options) |
{ | { |
return _rep->lookup(criteria); |
return _rep->lookup(criteria,options); |
} | } |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |