version 1.8, 2006/04/18 19:08:42
|
version 1.9, 2006/11/14 18:34:48
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Tony Fiorentino (fiorentino_tony@emc.com) |
|
// |
|
// Modified By: |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#include "CIMServerDiscovery.h" | #include "CIMServerDiscovery.h" |
|
|
// Filthy hack. User is responsible for adjusting values, | // Filthy hack. User is responsible for adjusting values, |
// and for new/delete of any struct used | // and for new/delete of any struct used |
///////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////// |
SLPClientOptions::SLPClientOptions(){ |
|
|
SLPClientOptions::SLPClientOptions() |
|
{ |
//initialise everything | //initialise everything |
target_address = NULL; | target_address = NULL; |
local_interface = NULL; | local_interface = NULL; |
|
|
predicate = NULL; | predicate = NULL; |
use_directory_agent = false; | use_directory_agent = false; |
} | } |
SLPClientOptions::~SLPClientOptions(){ |
|
|
SLPClientOptions::~SLPClientOptions() |
|
{ |
// free all pointers | // free all pointers |
free(target_address); | free(target_address); |
free(local_interface); | free(local_interface); |
|
|
free(service_type); | free(service_type); |
free(predicate); | free(predicate); |
} | } |
void SLPClientOptions::print() const{ |
|
|
void SLPClientOptions::print() const |
|
{ |
printf("target_address %s\n",target_address!=NULL?target_address:"NULL"); | printf("target_address %s\n",target_address!=NULL?target_address:"NULL"); |
printf("local_interface %s\n",local_interface!=NULL?local_interface:"NULL"); | printf("local_interface %s\n",local_interface!=NULL?local_interface:"NULL"); |
printf("target_port %d\n",target_port); | printf("target_port %d\n",target_port); |
|
|
printf("use_directory_agent %s\n",use_directory_agent==0?"false":"true"); | printf("use_directory_agent %s\n",use_directory_agent==0?"false":"true"); |
} | } |
| |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#ifdef PEGASUS_SLP_CLIENT_INTERFACE_WRAPPER | #ifdef PEGASUS_SLP_CLIENT_INTERFACE_WRAPPER |
|
|
#elif OPENSLP_SLP_CLIENT_INTERFACE_WRAPPER | #elif OPENSLP_SLP_CLIENT_INTERFACE_WRAPPER |
# include "OpenSLPWrapper.cpp" | # include "OpenSLPWrapper.cpp" |
#else | #else |
|
|
// No interface wrapper selected | // No interface wrapper selected |
|
|
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
|
|
///////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////// |
// CIMServerDiscoveryRep | // CIMServerDiscoveryRep |
///////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////// |
|
|
CIMServerDiscoveryRep::CIMServerDiscoveryRep() | CIMServerDiscoveryRep::CIMServerDiscoveryRep() |
{ | { |
} | } |
|
|
{ | { |
} | } |
| |
Array<CIMServerDescription> |
Array<CIMServerDescription> CIMServerDiscoveryRep::lookup( |
CIMServerDiscoveryRep::lookup(const Array<Attribute> & criteria, const SLPClientOptions* options) |
const Array<Attribute>& criteria, |
|
const SLPClientOptions* options) |
{ | { |
Array<CIMServerDescription> connections; | Array<CIMServerDescription> connections; |
return connections; | return connections; |
|
|
delete _rep; | delete _rep; |
} | } |
| |
Array<CIMServerDescription> |
Array<CIMServerDescription> CIMServerDiscovery::lookup( |
CIMServerDiscovery::lookup(const SLPClientOptions* options) |
const SLPClientOptions* options) |
{ | { |
Array<Attribute> criteria; | Array<Attribute> criteria; |
return _rep->lookup(criteria,options); | return _rep->lookup(criteria,options); |
} | } |
| |
Array<CIMServerDescription> |
Array<CIMServerDescription> CIMServerDiscovery::lookup( |
CIMServerDiscovery::lookup(const Array<Attribute> & criteria, const SLPClientOptions* options) |
const Array<Attribute>& criteria, |
|
const SLPClientOptions* options) |
{ | { |
return _rep->lookup(criteria,options); | return _rep->lookup(criteria,options); |
} | } |