Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages | Examples

ColCOWS_Module.idl

00001 //===========================================================================//
00002 //    
00003 //    Description: CORBA interface for ColCOWS objects
00004 //    Filename: colcows/ColCOWSModule.idl
00005 //    Authors: Michael Dussere and Aurélien Esnard
00006 //    
00007 //===========================================================================//
00008 //    
00009 //    Copyright (C) 2003 INRIA and CNRS
00010 //    
00011 //    This library is free software; you can redistribute it and/or
00012 //    modify it under the terms of the GNU Lesser General Public
00013 //    License as published by the Free Software Foundation; either
00014 //    version 2.1 of the License, or (at your option) any later version.
00015 //    
00016 //    This library is distributed in the hope that it will be useful,
00017 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 //    Lesser General Public License for more details.
00020 //    
00021 //    You should have received a copy of the GNU Lesser General Public
00022 //    License along with this library; if not, write to the Free Software
00023 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 //    
00025 //===========================================================================//
00026 
00027 #ifndef __COLCOWS_MODULE_IDL__
00028 #define __COLCOWS_MODULE_IDL__
00029 
00030 #pragma prefix "colcows"
00031 
00032 //! ColCOWS IDL module
00033 module ColCOWS {
00034   
00035   //! ColCOWS exception
00036   exception CorbaException {
00037     short   kind; 
00038     string  info;
00039     string  file; 
00040     long    line;
00041   };
00042 
00043   // ========== type ========== //
00044 
00045   //! object reference description
00046   struct IdlObjectDesc {
00047     //    unsigned long  num_node;
00048     string         obj_id;
00049     string         obj_kind;
00050     any            obj_ref;
00051   };  
00052 
00053   //! sequence of object reference description
00054   typedef sequence<IdlObjectDesc> IdlObjectDescSeq;
00055   
00056   // forward declaration
00057   interface NodeInterface;
00058 
00059 #ifdef __DEPRECATED_IDL__
00060 
00061   //! Description of a ColCOWS Node
00062   struct IdlNodeDesc {
00063     //! Kind of the Workspace node ("proxy", "node", "master" ...)
00064     string         node_kind;
00065     //! Number of the node among the node hierarchy
00066     unsigned long  num_node;
00067     //! Max number of its descendants among the node hierarchy
00068     unsigned long  max_descendant;
00069     //! Is the node activated
00070     boolean        activated;
00071     //! Reference on its Node interface
00072     NodeInterface  node_ref;
00073     //! Sequence of reference descriptions collected by the node 
00074     IdlObjectDescSeq     ref_seq;
00075     //! Sequence of children description
00076     sequence<IdlNodeDesc> children_seq;
00077   };
00078 
00079   //! Sequence of ColCOWS Node descriptions
00080   typedef sequence<IdlNodeDesc> IdlNodeDescSeq;
00081 
00082 #else
00083 
00084   // forward declaration
00085   struct IdlNodeDesc;
00086 
00087   //! Sequence of ColCOWS Node descriptions
00088   typedef sequence<IdlNodeDesc> IdlNodeDescSeq;
00089 
00090   //! Description of a ColCOWS Node
00091   struct IdlNodeDesc {
00092     //! Kind of the Workspace node ("proxy", "node", "master" ...)
00093     string         node_kind;
00094     //! Number of the node among the node hierarchy
00095     unsigned long  num_node;
00096     //! Max number of its descendants among the node hierarchy
00097     unsigned long  max_descendant;
00098     //! Is the node activated
00099     boolean        activated;
00100     //! Reference on its Node interface
00101     NodeInterface  node_ref;
00102     //! Sequence of reference descriptions collected by the node 
00103     IdlObjectDescSeq     ref_seq;
00104     //! Sequence of children description
00105     IdlNodeDescSeq children_seq;
00106   };
00107 
00108 #endif // __DEPRECATED_IDL__
00109 
00110   //! object reference description
00111   struct IdlWorkspaceDesc {
00112     //! Workspace Id
00113     string         ws_id;
00114     //! Workspace Kind
00115     string         ws_kind;
00116     //! Number of nodes in the workspace
00117     unsigned long  nb_nodes;
00118     //! Is the workspace activated
00119     boolean        activated;
00120     //! Number of connection
00121     unsigned long  num_connection;
00122     //! Reference on the root ColCOWS Node
00123     NodeInterface  enter_node_ref;
00124     //! Root ColCOWS Node description
00125     IdlNodeDesc    enter_node;
00126   };
00127   typedef sequence<IdlWorkspaceDesc> IdlWorkspaceDescSeq;
00128   
00129 
00130   //===========================================================================//
00131   //                         Generic ColCOWS Interface                         //
00132   //===========================================================================//
00133 
00134   //! Generic ColCOWS Interface
00135   interface NodeInterface {
00136 
00137     //=================================================================
00138     //                       Deployment 
00139     //=================================================================
00140     
00141     //! set the workspace description [protected]
00142     oneway void setWorkspace(in IdlWorkspaceDesc ws_desc );
00143 
00144     //! set the description of a node's child description [protected]
00145     void setChildNode(in IdlNodeDesc node_desc) raises (CorbaException);
00146 
00147     //=================================================================
00148     
00149     //! get the workspace description [public]
00150     void getNode(in unsigned long num_node, out IdlNodeDesc node_desc) raises (CorbaException);
00151 
00152     //! get the workspace description [public]
00153     void getWorkspace(out IdlWorkspaceDesc ws_desc) raises (CorbaException);
00154 
00155     //=================================================================
00156     
00157     //! get the remote workspace description [public]
00158     void getRemoteWorkspace( in unsigned long num_connection, 
00159                              out IdlWorkspaceDesc ws_desc) raises (CorbaException);
00160     
00161     //! set the remote workspace description [protected]
00162     oneway void setRemoteWorkspace( in unsigned long num_connection, 
00163                              in IdlWorkspaceDesc ws_desc, 
00164                              in boolean initiator);
00165 
00166     //! release the remote workspace description [protected]
00167     oneway void releaseRemoteWorkspace( in unsigned long num_connection );
00168         
00169     //=================================================================
00170 
00171     //! test if the workspace is activated [public]
00172     boolean isActivated() raises (CorbaException);
00173     
00174     //! test if the workspace is ready to receive connections [public]
00175     boolean isReady() raises (CorbaException);
00176     
00177     //! test if the collective node is connected [public]
00178     boolean isConnected( in unsigned long num_connection ) raises (CorbaException);
00179 
00180     //! get the connection number [public]
00181     unsigned long getNumConnection( in string ws_id, in string ws_kind ) raises (CorbaException);
00182 
00183     //! get a unique connection number [public]
00184     void getCommonNumConnection( inout unsigned long num_connection ) raises (CorbaException);
00185 
00186   };
00187  
00188 }; // end of module COLCOWS
00189 
00190 #endif // __COLCOWS_MODULE_IDL__
00191 
00192 // EOF

Generated on Tue Jun 21 12:55:56 2005 for ColCOWS by  doxygen 1.4.1