Changeset 4476

Show
Ignore:
Timestamp:
07/19/07 14:47:18 (6 years ago)
Author:
jgaeddert
Message:

updating main.cpp, .spd.xml in FileInput?

Location:
components/FileInput/trunk/FileInput
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • components/FileInput/trunk/FileInput/FileInput.spd.xml

    r4391 r4476  
    1212    </author> 
    1313    <propertyfile type="PRF"> 
    14         <localfile name="xml/FileInput/FileInput.prf.xml"/> 
     14        <localfile name="FileInput.prf.xml"/> 
    1515    </propertyfile> 
    1616    <descriptor> 
    17         <localfile name="xml/FileInput/FileInput.scd.xml"/> 
     17        <localfile name="FileInput.scd.xml"/> 
    1818    </descriptor> 
    1919    <implementation id="DCE:3855c5c0-6db5-11db-b780-00123f63025f" aepcompliance="aep_compliant"> 
    20         <description>Default Description</description>  
     20        <description>Default implementation description</description>  
    2121        <code type="Executable"> 
    22             <localfile name="bin/FileInput"/> 
     22            <localfile name="/bin/FileInput"/> 
    2323        </code> 
    2424        <processor name="x86"/> 
  • components/FileInput/trunk/FileInput/main.cpp

    r2575 r4476  
    2222 
    2323#include <iostream> 
     24 
    2425#include "ossie/ossieSupport.h" 
    2526#include "ossie/debug.h" 
     
    2728#include "FileInput.h" 
    2829 
     30 
    2931int main(int argc, char* argv[]) 
    3032 
    3133{ 
     34    ossieDebugLevel = 3; 
     35 
    3236    ossieSupport::ORB *orb = new ossieSupport::ORB; 
    3337    omni_mutex component_running_mutex; 
    3438    omni_condition *component_running = new omni_condition(&component_running_mutex); 
    3539 
    36     ossieDebugLevel = 5; 
    37  
    38     if (argc != 3) { 
    39         std::cout << argv[0] << " <id> <usage name> " << std::endl; 
    40         exit (-1); 
    41     } 
    42  
    43     char *uuid = argv[1]; 
    44     char *label = argv[2]; 
    45  
    46     DEBUG(1, FileInput, "Identifier - " << uuid << "  Label - " << label) 
     40    ossieSupport::ossieComponent fileinput(orb, argc, argv); 
    4741 
    4842    FileInput_i* fileinput_servant; 
     
    5145    // Create the fileinput component servant and object reference 
    5246 
    53     fileinput_servant = new FileInput_i(uuid, component_running); 
     47    fileinput_servant = new FileInput_i(fileinput.getUuid(), component_running); 
    5448    fileinput_var = fileinput_servant->_this(); 
    55     fileinput_servant->post_constructor(fileinput_var); 
    5649 
    57     orb->bind_object_to_name((CORBA::Object_ptr) fileinput_var, label); 
     50    PortableServer::ObjectId_var servantId = orb->poa->reference_to_id(fileinput_var); 
     51 
     52    fileinput.bind(fileinput_var); 
    5853 
    5954    // This bit is ORB specific 
     
    6358 
    6459    component_running->wait(); 
    65     orb->unbind_name(label); 
     60 
     61    fileinput.unbind(); 
     62 
     63    DEBUG(4, FileInput, "Deactivate object."); 
     64    orb->poa->deactivate_object(servantId); 
     65 
     66    DEBUG(4, FileInput, "Destroy POA."); 
     67    orb->poa->destroy(false, false); 
     68 
     69    DEBUG(4, FileInput, "Shutdown orb."); 
    6670    orb->orb->shutdown(0); 
    6771