(file) Return to SLPAttrib.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Server / Attic

Diff for /pegasus/src/Pegasus/Server/Attic/SLPAttrib.cpp between version 1.2 and 1.3

version 1.2, 2006/11/29 22:09:30 version 1.3, 2007/04/05 18:46:41
Line 52 
Line 52 
                                       "OtherCommunicationMechanismDescription";                                       "OtherCommunicationMechanismDescription";
 static const String PROP_INTEROPSCHEMANAMESPACE = "InteropSchemaNamespace"; static const String PROP_INTEROPSCHEMANAMESPACE = "InteropSchemaNamespace";
 static const String PROP_VERSION = "Version"; static const String PROP_VERSION = "Version";
 static const String PROP_FUNCTIONALPROFILESSUPPORTED = "FunctionalProfilesSupported";  static const String PROP_FUNCTIONALPROFILESSUPPORTED =
       "FunctionalProfilesSupported";
 static const String PROP_FUNCTIONALPROFILEDESCRIPTIONS = static const String PROP_FUNCTIONALPROFILEDESCRIPTIONS =
                                                       "FunctionalProfileDescriptions";                                                       "FunctionalProfileDescriptions";
 static const String PROP_MULTIPLEOPERATIONSSUPPORTED = "MultipleOperationsSupported";  static const String PROP_MULTIPLEOPERATIONSSUPPORTED =
       "MultipleOperationsSupported";
 static const String PROP_AUTHENTICATIONMECHANISMSSUPPORTED = static const String PROP_AUTHENTICATIONMECHANISMSSUPPORTED =
                                                      "AuthenticationMechanismsSupported";                                                      "AuthenticationMechanismsSupported";
 static const String PROP_AUTHENTICATIONMECHANISMDESCRIPTIONS = static const String PROP_AUTHENTICATIONMECHANISMDESCRIPTIONS =
Line 64 
Line 66 
 static const String PROP_IPADDRESS = "IPAddress"; static const String PROP_IPADDRESS = "IPAddress";
  
 static const String CIM_CLASSNAME_REGISTEREDPROFILE = "CIM_RegisteredProfile"; static const String CIM_CLASSNAME_REGISTEREDPROFILE = "CIM_RegisteredProfile";
 static const String PROP_OTHERREGISTEREDORGANIZATION = "OtherRegisteredOrganization";  static const String PROP_OTHERREGISTEREDORGANIZATION =
       "OtherRegisteredOrganization";
 static const String PROP_REGISTEREDNAME = "RegisteredName"; static const String PROP_REGISTEREDNAME = "RegisteredName";
 static const String PROP_ADVERTISETYPES = "AdvertiseTypes"; static const String PROP_ADVERTISETYPES = "AdvertiseTypes";
  
Line 120 
Line 123 
         Boolean deepInheritance=true;         Boolean deepInheritance=true;
         Uint32 len = 0;         Uint32 len = 0;
  
         // set to true if there is "Other" property value in FunctionsProfilesSupported value.          // set to true if there is "Other" property value in
           // FunctionsProfilesSupported value.
         Boolean functionaProfileDescriptions = false;         Boolean functionaProfileDescriptions = false;
  
         instances = client.enumerateInstances          instances = client.enumerateInstances (
             (PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_OBJECTMANAGER,              PEGASUS_NAMESPACENAME_INTEROP,
                deepInheritance,localOnly,includeQualifiers,includeClassOrigin);              PEGASUS_CLASSNAME_OBJECTMANAGER,
               deepInheritance,
               localOnly,
               includeQualifiers,
               includeClassOrigin);
  
         PEGASUS_ASSERT (instances.size () == 1);         PEGASUS_ASSERT (instances.size () == 1);
  
Line 144 
Line 152 
         val = instances[0].getProperty(pos).getValue ();         val = instances[0].getProperty(pos).getValue ();
         serviceId = val.toString();         serviceId = val.toString();
  
         instances = client.enumerateInstances          instances = client.enumerateInstances (
             (PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_PG_CIMXMLCOMMUNICATIONMECHANISM,              PEGASUS_NAMESPACENAME_INTEROP,
               deepInheritance,localOnly,includeQualifiers,includeClassOrigin);              PEGASUS_CLASSNAME_PG_CIMXMLCOMMUNICATIONMECHANISM,
               deepInheritance,
               localOnly,
               includeQualifiers,
               includeClassOrigin);
  
         for (Uint32 n=instances.size(),i=0 ; i<n; i++)         for (Uint32 n=instances.size(),i=0 ; i<n; i++)
         {         {
Line 179 
Line 191 
             return false;             return false;
         }         }
  
         cimClass = client.getClass(PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_CIMNAMESPACE);          cimClass = client.getClass(PEGASUS_NAMESPACENAME_INTEROP,
               PEGASUS_CLASSNAME_CIMNAMESPACE);
         instances = client.enumerateInstances         instances = client.enumerateInstances
             (PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_CIMNAMESPACE,deepInheritance,              (PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_CIMNAMESPACE,
              localOnly,includeQualifiers,includeClassOrigin);               deepInheritance, localOnly,includeQualifiers,includeClassOrigin);
  
         for (Uint32 n=instances.size(),i=0 ; i<n; i++)         for (Uint32 n=instances.size(),i=0 ; i<n; i++)
         {         {
Line 208 
Line 221 
         if (len > 0)         if (len > 0)
             classes.remove( len-1,1);             classes.remove( len-1,1);
  
         cimClass = client.getClass          cimClass = client.getClass (PEGASUS_NAMESPACENAME_INTEROP,
            (PEGASUS_NAMESPACENAME_INTEROP,  
             PEGASUS_CLASSNAME_OBJECTMANAGERCOMMUNICATIONMECHANISM);             PEGASUS_CLASSNAME_OBJECTMANAGERCOMMUNICATIONMECHANISM);
         instances = client.enumerateInstances          instances = client.enumerateInstances (PEGASUS_NAMESPACENAME_INTEROP,
            (PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_OBJECTMANAGERCOMMUNICATIONMECHANISM,              PEGASUS_CLASSNAME_OBJECTMANAGERCOMMUNICATIONMECHANISM,
             deepInheritance,localOnly,includeQualifiers,includeClassOrigin);             deepInheritance,localOnly,includeQualifiers,includeClassOrigin);
  
         pos = saveInstance.findProperty (PROP_COMMUNICATIONMECHANISM);         pos = saveInstance.findProperty (PROP_COMMUNICATIONMECHANISM);
Line 220 
Line 232 
         val = saveInstance.getProperty(pos).getValue();         val = saveInstance.getProperty(pos).getValue();
         pos = cimClass.findProperty(PROP_COMMUNICATIONMECHANISM);         pos = cimClass.findProperty(PROP_COMMUNICATIONMECHANISM);
         communicationMechanism = getMappedValue(cimClass.getProperty(pos),val);         communicationMechanism = getMappedValue(cimClass.getProperty(pos),val);
         pos = saveInstance.findProperty (PROP_OTHERCOMMUNICATIONMECHANISMDESCRIPTION);          pos = saveInstance.findProperty (
               PROP_OTHERCOMMUNICATIONMECHANISMDESCRIPTION);
         PEGASUS_ASSERT (pos != PEG_NOT_FOUND);         PEGASUS_ASSERT (pos != PEG_NOT_FOUND);
   
         val = saveInstance.getProperty(pos).getValue ();         val = saveInstance.getProperty(pos).getValue ();
         otherCommunicationMechanismDescription = val.toString();         otherCommunicationMechanismDescription = val.toString();
  
Line 235 
Line 249 
  
         pos = saveInstance.findProperty (PROP_FUNCTIONALPROFILESSUPPORTED);         pos = saveInstance.findProperty (PROP_FUNCTIONALPROFILESSUPPORTED);
         PEGASUS_ASSERT (pos != PEG_NOT_FOUND);         PEGASUS_ASSERT (pos != PEG_NOT_FOUND);
   
         CIMConstProperty constProperty;         CIMConstProperty constProperty;
         constProperty = saveInstance.getProperty(pos);         constProperty = saveInstance.getProperty(pos);
         val = constProperty.getValue();         val = constProperty.getValue();
Line 246 
Line 261 
             String profileValue = getMappedValue(cimClass.getProperty(pos),             String profileValue = getMappedValue(cimClass.getProperty(pos),
                                                  CIMValue(arrayValFPS[i]));                                                  CIMValue(arrayValFPS[i]));
             if (profileValue == "Other")             if (profileValue == "Other")
               {
                 functionaProfileDescriptions = true;                 functionaProfileDescriptions = true;
               }
             functionalProfilesSupported.append(profileValue);             functionalProfilesSupported.append(profileValue);
             functionalProfilesSupported.append(",");             functionalProfilesSupported.append(",");
         }         }
Line 280 
Line 297 
         else         else
             multipleOperationsSupported.append("FALSE");             multipleOperationsSupported.append("FALSE");
  
         pos = saveInstance.findProperty (PROP_AUTHENTICATIONMECHANISMSSUPPORTED);          pos = saveInstance.findProperty (
               PROP_AUTHENTICATIONMECHANISMSSUPPORTED);
         PEGASUS_ASSERT (pos != PEG_NOT_FOUND);         PEGASUS_ASSERT (pos != PEG_NOT_FOUND);
         val = saveInstance.getProperty(pos).getValue();         val = saveInstance.getProperty(pos).getValue();
         Array<Uint16> arrayValAMS;         Array<Uint16> arrayValAMS;
Line 288 
Line 306 
         pos = cimClass.findProperty (PROP_AUTHENTICATIONMECHANISMSSUPPORTED);         pos = cimClass.findProperty (PROP_AUTHENTICATIONMECHANISMSSUPPORTED);
         for (Uint32 n=arrayValAMS.size(),i=0; i<n; i++)         for (Uint32 n=arrayValAMS.size(),i=0; i<n; i++)
         {         {
             authenticationMechanismsSupported.append(getMappedValue(cimClass.getProperty(pos),              authenticationMechanismsSupported.append(
                   getMappedValue(cimClass.getProperty(pos),
                                                       CIMValue(arrayValAMS[i])));                                                       CIMValue(arrayValAMS[i])));
             authenticationMechanismsSupported.append(",");             authenticationMechanismsSupported.append(",");
         }         }
Line 296 
Line 315 
         if (len > 0)         if (len > 0)
             authenticationMechanismsSupported.remove( len-1,1);             authenticationMechanismsSupported.remove( len-1,1);
  
         pos = saveInstance.findProperty (PROP_AUTHENTICATIONMECHANISMDESCRIPTIONS);          pos = saveInstance.findProperty (
               PROP_AUTHENTICATIONMECHANISMDESCRIPTIONS);
         PEGASUS_ASSERT (pos != PEG_NOT_FOUND);         PEGASUS_ASSERT (pos != PEG_NOT_FOUND);
         val = saveInstance.getProperty(pos).getValue();         val = saveInstance.getProperty(pos).getValue();
         Array<String> arrayValAMD;         Array<String> arrayValAMD;
Line 309 
Line 329 
         len = authenticationMechanismDescriptions.size();         len = authenticationMechanismDescriptions.size();
         if (len > 0)         if (len > 0)
             authenticationMechanismDescriptions.remove( len-1,1);             authenticationMechanismDescriptions.remove( len-1,1);
         instances = client.enumerateInstances          instances = client.enumerateInstances (PEGASUS_NAMESPACENAME_INTEROP,
             (PEGASUS_NAMESPACENAME_INTEROP, CIM_CLASSNAME_REGISTEREDPROFILE,              CIM_CLASSNAME_REGISTEREDPROFILE,
               deepInheritance,localOnly,includeQualifiers,includeClassOrigin);               deepInheritance,localOnly,includeQualifiers,includeClassOrigin);
  
         for (Uint32 n=instances.size(),i=0 ; i<n; i++)         for (Uint32 n=instances.size(),i=0 ; i<n; i++)
Line 324 
Line 344 
             {             {
                 if(advTypes[j] == 3)                 if(advTypes[j] == 3)
                 {                 {
                     pos = instances[i].findProperty (PROP_OTHERREGISTEREDORGANIZATION);                      pos = instances[i].findProperty (
                           PROP_OTHERREGISTEREDORGANIZATION);
                     PEGASUS_ASSERT (pos != PEG_NOT_FOUND);                     PEGASUS_ASSERT (pos != PEG_NOT_FOUND);
                     registeredProfiles.append(instances[i].getProperty(pos).getValue().toString());                      registeredProfiles.append(
                           instances[i].getProperty(pos).getValue().toString());
                     registeredProfiles.append(":");                     registeredProfiles.append(":");
                     pos = instances[i].findProperty (PROP_REGISTEREDNAME);                     pos = instances[i].findProperty (PROP_REGISTEREDNAME);
                     PEGASUS_ASSERT (pos != PEG_NOT_FOUND);                     PEGASUS_ASSERT (pos != PEG_NOT_FOUND);
                     registeredProfiles.append(instances[i].getProperty(pos).getValue().toString());                      registeredProfiles.append(
                           instances[i].getProperty(pos).getValue().toString());
                     registeredProfiles.append(",");                     registeredProfiles.append(",");
                     break;                     break;
                 }                 }
Line 350 
Line 373 
     {     {
         Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,         Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,
                      "Server.CIMServer.EXTERNAL_SLP_REGISTRATION_FAILED_EXCEPTION",                      "Server.CIMServer.EXTERNAL_SLP_REGISTRATION_FAILED_EXCEPTION",
                      "exception raised during CIMServer registration with External SLP. $0",              "exception raised during CIMServer registration with"
                   " External SLP. $0",
                      e.getMessage());                      e.getMessage());
     }     }
  
Line 358 
Line 382 
     {     {
         Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,         Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,
                      "Server.CIMServer.EXTERNAL_SLP_REGISTRATION_FAILED_EXCEPTION",                      "Server.CIMServer.EXTERNAL_SLP_REGISTRATION_FAILED_EXCEPTION",
                      "Exception raised during CIMserver registration with External SLP.");             "Exception raised during CIMserver registration with"
                  " External SLP.");
     }     }
  
     client.disconnect();     client.disconnect();
Line 372 
Line 397 
     Uint16 localValue;     Uint16 localValue;
  
     if (strcmp(cimTypeToString(value.getType()),"string") == 0)     if (strcmp(cimTypeToString(value.getType()),"string") == 0)
       {
        value.get(retValue);        value.get(retValue);
       }
     else     else
     {     {
         value.get(localValue);         value.get(localValue);
Line 381 
Line 408 
  
     Uint32 posValueMap;     Uint32 posValueMap;
  
     if ((posValueMap = cimProperty.findQualifier(CIMName("ValueMap"))) == PEG_NOT_FOUND)      if ((posValueMap = cimProperty.findQualifier(CIMName("ValueMap")))
           == PEG_NOT_FOUND)
     {     {
         return retValue;         return retValue;
     }     }
Line 429 
Line 457 
 // Form the attributes String. // Form the attributes String.
 void SLPAttrib::formAttributes() void SLPAttrib::formAttributes()
 { {
   
     attributes.append(Formatter::format(     attributes.append(Formatter::format(
                         "(template-url-syntax=$0),(service-hi-name=$1),"                         "(template-url-syntax=$0),(service-hi-name=$1),"
                          "(service-hi-description=$2),(service-id=$3),"                          "(service-hi-description=$2),(service-id=$3),"


Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2