Show
Ignore:
Timestamp:
03/06/09 20:25:21 (4 years ago)
Author:
deepanns
Message:

updated query and configure for components

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/branches/deepanns/components/JPEG_VideoViewer/JPEG_VideoViewer.cpp

    r2915 r8886  
    158158} 
    159159 
     160void  
     161JPEG_VideoViewer_i::query (CF::Properties & configProperties) 
     162throw (CORBA::SystemException, CF::UnknownProperties) 
     163{ 
     164    // for queries of zero length, return all id/value pairs in propertySet 
     165    if (configProperties.length () == 0) 
     166    {    
     167        configProperties.length (propertySet.length ()); 
     168        for (unsigned int i = 0; i < propertySet.length (); i++) 
     169        { 
     170            configProperties[i].id = CORBA::string_dup (propertySet[i].id); 
     171            configProperties[i].value = propertySet[i].value; 
     172        } 
     173 
     174        return ; 
     175    }    
     176    else { 
     177        for (unsigned int i = 0; i < configProperties.length(); i++) { 
     178            for (unsigned int j=0; j < propertySet.length(); j++) { 
     179                if ( strcmp(configProperties[i].id, propertySet[i].id) == 0 ){ 
     180                    configProperties[i].value = propertySet[i].value; 
     181               } 
     182            } 
     183        } 
     184    }    
     185} 
     186 
     187 
     188 
     189 
    160190void JPEG_VideoViewer_i::configure(const CF::Properties& props) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration) 
    161191{ 
     192         
    162193    DEBUG(3, JPEG_VideoViewer, "configure invoked") 
    163194