(file) Return to CIMServerDiscovery.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Client

  1 karl  1.7 //%2006////////////////////////////////////////////////////////////////////////
  2 tony  1.1 //
  3 karl  1.4 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4           // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6 karl  1.2 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.4 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8           // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl  1.5 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.7 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12           // EMC Corporation; Symantec Corporation; The Open Group.
 13 tony  1.1 //
 14           // Permission is hereby granted, free of charge, to any person obtaining a copy
 15           // of this software and associated documentation files (the "Software"), to
 16           // deal in the Software without restriction, including without limitation the
 17           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18           // sell copies of the Software, and to permit persons to whom the Software is
 19           // furnished to do so, subject to the following conditions:
 20           // 
 21           // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29           //
 30           //==============================================================================
 31           //
 32           // Author: Tony Fiorentino (fiorentino_tony@emc.com)
 33           //
 34 tony  1.1 // Modified By:
 35           //
 36           //%/////////////////////////////////////////////////////////////////////////////
 37           
 38           #include "CIMServerDiscovery.h"
 39           
 40 karl  1.3 #include <string.h> // for strdup
 41           
 42           PEGASUS_NAMESPACE_BEGIN
 43           /////////////////////////////////////////////////////////////////////////////
 44           // SLPClientOptions
 45           // Filthy hack. User is responsible for adjusting values, 
 46           // and for new/delete of any struct used
 47           /////////////////////////////////////////////////////////////////////////////
 48           SLPClientOptions::SLPClientOptions(){
 49           	//initialise everything
 50           	target_address  = NULL;
 51           	local_interface  = NULL;
 52           	target_port = 427;
 53           	spi = NULL;
 54           	scopes = strdup("DEFAULT");
 55           	service_type = strdup("service:wbem");
 56           	predicate = NULL;
 57           	use_directory_agent = false;
 58           }
 59           SLPClientOptions::~SLPClientOptions(){
 60           	// free all pointers
 61 karl  1.3 	free(target_address);
 62           	free(local_interface);
 63           	free(spi);
 64           	free(scopes);
 65           	free(service_type);
 66           	free(predicate);
 67           }
 68           void SLPClientOptions::print() const{
 69           	printf("target_address %s\n",target_address!=NULL?target_address:"NULL");
 70           	printf("local_interface %s\n",local_interface!=NULL?local_interface:"NULL");
 71           	printf("target_port %d\n",target_port);
 72           	printf("spi %s\n",spi!=NULL?spi:"NULL");
 73           	printf("scopes %s\n",scopes!=NULL?scopes:"NULL");
 74           	printf("service_type %s\n",service_type!=NULL?service_type:"NULL");
 75           	printf("predicate %s\n",predicate!=NULL?predicate:"NULL");
 76 david.dillard 1.6 	printf("use_directory_agent %s\n",use_directory_agent==0?"false":"true");
 77 karl          1.3 }
 78                   
 79                   
 80                   PEGASUS_NAMESPACE_END
 81                   
 82 tony          1.1 #ifdef PEGASUS_SLP_CLIENT_INTERFACE_WRAPPER
 83                   # include "PegasusSLPWrapper.cpp"
 84                   #elif OPENSLP_SLP_CLIENT_INTERFACE_WRAPPER
 85                   # include "OpenSLPWrapper.cpp"
 86                   #else
 87                   // No interface wrapper selected
 88                   PEGASUS_NAMESPACE_BEGIN
 89 karl          1.3 /////////////////////////////////////////////////////////////////////////////
 90                   // CIMServerDiscoveryRep
 91                   /////////////////////////////////////////////////////////////////////////////
 92 tony          1.1 CIMServerDiscoveryRep::CIMServerDiscoveryRep()
 93                   {
 94                   }
 95                   
 96                   CIMServerDiscoveryRep::~CIMServerDiscoveryRep()
 97                   {
 98                   }
 99                   
100                   Array<CIMServerDescription>
101 karl          1.3 CIMServerDiscoveryRep::lookup(const Array<Attribute> & criteria, const SLPClientOptions* options)
102 tony          1.1 {
103                     Array<CIMServerDescription> connections;
104                     return connections;
105                   }
106                   
107                   PEGASUS_NAMESPACE_END
108                   #endif
109                   
110                   PEGASUS_NAMESPACE_BEGIN
111                   
112                   /////////////////////////////////////////////////////////////////////////////
113                   // CIMServerDiscovery
114                   /////////////////////////////////////////////////////////////////////////////
115                   CIMServerDiscovery::CIMServerDiscovery()
116                   :_rep(new CIMServerDiscoveryRep())
117                   {
118                   }
119                   
120                   CIMServerDiscovery::~CIMServerDiscovery()
121                   {
122                       delete _rep;
123 tony          1.1 }
124                   
125                   Array<CIMServerDescription>
126 karl          1.3 CIMServerDiscovery::lookup(const SLPClientOptions* options)
127 tony          1.1 {
128                     Array<Attribute> criteria;
129 karl          1.3   return _rep->lookup(criteria,options);
130 tony          1.1 }
131                   
132                   Array<CIMServerDescription>
133 karl          1.3 CIMServerDiscovery::lookup(const Array<Attribute> & criteria, const SLPClientOptions* options)
134 tony          1.1 {
135 karl          1.3   return _rep->lookup(criteria,options);
136 tony          1.1 }
137                   
138                   PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2