Convert files from DOS format to normal text.
authorThomas G. Lockhart
Sun, 3 Dec 2000 14:43:59 +0000 (14:43 +0000)
committerThomas G. Lockhart
Sun, 3 Dec 2000 14:43:59 +0000 (14:43 +0000)
src/corba/CosQuery.idl
src/corba/CosQueryCollection.idl
src/corba/pgsql.idl
src/corba/server.cc

index 881be07d6ec89c1267c579bfa0ac184b9596cbfc..240a08be1294f33dd2d44d344453beae518e68a7 100644 (file)
@@ -1,89 +1,89 @@
-/* RCS $Id: CosQuery.idl,v 1.1 1998/11/17 03:10:35 scrappy Exp $\r
- *\r
- * ----------------------------------------------------------------------------\r
- * This is unmarked software provided by the Object Management Group,Inc. (OMG)\r
- * ----------------------------------------------------------------------------\r
- */\r
-\r
-\r
-/**\r
- * CosQuery is the Common Object Services Specification query module\r
- * as it it appears in COSS1, v1.0.\r
- */\r
-\r
-\r
-#ifndef CosQuery_idl\r
-#define CosQuery_idl\r
-\r
-#ifndef CosQueryCollection_idl\r
-#include "CosQueryCollection.idl"\r
-#endif\r
-\r
-module CosQuery {\r
-\r
-  exception QueryInvalid {string why;}; \r
-  exception QueryProcessingError {string why;}; \r
-  exception QueryTypeInvalid {};\r
-\r
-  enum QueryStatus {complete, incomplete};\r
-\r
-  typedef CosQueryCollection::ParameterList ParameterList;\r
-\r
-  typedef CORBA::InterfaceDef QLType;\r
-  typedef sequence QLTypeSeq;\r
-\r
-  interface Query;\r
-  interface QueryLanguageType {}; \r
-  interface SQLQuery : QueryLanguageType {}; \r
-  interface SQL_92Query : SQLQuery {}; \r
-  interface OQL : QueryLanguageType {}; \r
-  interface OQLBasic : OQL {}; \r
-  interface OQL_93 : OQL {}; \r
-  interface OQL_93Basic : OQL_93, OQLBasic {};\r
-\r
-  interface QueryEvaluator { \r
-\r
-    readonly attribute QLTypeSeq ql_types; \r
-    readonly attribute QLType default_ql_type;\r
-\r
-    any evaluate (in string         query,\r
-         in QLType         ql_type, \r
-         in ParameterList  params) \r
-      raises(QueryTypeInvalid,\r
-        QueryInvalid,\r
-        QueryProcessingError); \r
-  };\r
-\r
-  interface QueryableCollection : QueryEvaluator, \r
-    CosQueryCollection::Collection {\r
-\r
-  };\r
-\r
-  interface QueryManager : QueryEvaluator { \r
-\r
-    Query create (in string          query,\r
-         in QLType          ql_type, \r
-         in  ParameterList  params) \r
-      raises(QueryTypeInvalid,\r
-        QueryInvalid);\r
-\r
-  };\r
-\r
-  interface Query { \r
-\r
-    readonly attribute QueryManager query_mgr;\r
-\r
-    void prepare (in ParameterList params) \r
-      raises(QueryProcessingError); \r
-\r
-    void execute (in ParameterList params) \r
-      raises(QueryProcessingError);\r
-\r
-    QueryStatus get_status (); \r
-\r
-    any get_result (); \r
-  };\r
-\r
-};\r
-\r
-#endif // CosQuery_idl\r
+/* RCS $Id: CosQuery.idl,v 1.2 2000/12/03 14:43:59 thomas Exp $
+ *
+ * ----------------------------------------------------------------------------
+ * This is unmarked software provided by the Object Management Group,Inc. (OMG)
+ * ----------------------------------------------------------------------------
+ */
+
+
+/**
+ * CosQuery is the Common Object Services Specification query module
+ * as it it appears in COSS1, v1.0.
+ */
+
+
+#ifndef CosQuery_idl
+#define CosQuery_idl
+
+#ifndef CosQueryCollection_idl
+#include "CosQueryCollection.idl"
+#endif
+
+module CosQuery {
+
+  exception QueryInvalid {string why;};
+  exception QueryProcessingError {string why;};
+  exception QueryTypeInvalid {};
+
+  enum QueryStatus {complete, incomplete};
+
+  typedef CosQueryCollection::ParameterList ParameterList;
+
+  typedef CORBA::InterfaceDef QLType;
+  typedef sequence QLTypeSeq;
+
+  interface Query;
+  interface QueryLanguageType {};
+  interface SQLQuery : QueryLanguageType {};
+  interface SQL_92Query : SQLQuery {};
+  interface OQL : QueryLanguageType {};
+  interface OQLBasic : OQL {};
+  interface OQL_93 : OQL {};
+  interface OQL_93Basic : OQL_93, OQLBasic {};
+
+  interface QueryEvaluator {
+
+    readonly attribute QLTypeSeq ql_types;
+    readonly attribute QLType default_ql_type;
+
+    any evaluate (in string         query,
+         in QLType         ql_type,
+         in ParameterList  params)
+      raises(QueryTypeInvalid,
+        QueryInvalid,
+        QueryProcessingError);
+  };
+
+  interface QueryableCollection : QueryEvaluator,
+    CosQueryCollection::Collection {
+
+  };
+
+  interface QueryManager : QueryEvaluator {
+
+    Query create (in string          query,
+         in QLType          ql_type,
+         in  ParameterList  params)
+      raises(QueryTypeInvalid,
+        QueryInvalid);
+
+  };
+
+  interface Query {
+
+    readonly attribute QueryManager query_mgr;
+
+    void prepare (in ParameterList params)
+      raises(QueryProcessingError);
+
+    void execute (in ParameterList params)
+      raises(QueryProcessingError);
+
+    QueryStatus get_status ();
+
+    any get_result ();
+  };
+
+};
+
+#endif // CosQuery_idl
index f6473d420e9d470cdf96d6c86c1ac1940cf3c6ed..670f2f3c62789df602c4040882194777b4c02747 100644 (file)
@@ -1,83 +1,83 @@
-/* RCS $Id: CosQueryCollection.idl,v 1.1 1998/11/16 18:03:34 scrappy Exp $\r
- *\r
- * ----------------------------------------------------------------------------\r
- * This is unmarked software provided by the Object Management Group,Inc. (OMG)\r
- * ----------------------------------------------------------------------------\r
- */\r
-\r
-\r
-/**\r
- * CosQueryCollection is the Common Object Services Specification query \r
- * query colleciton module as it it appears in COSS1, v1.0.\r
- */\r
-\r
-\r
-#ifndef CosQueryCollection_idl\r
-#define CosQueryCollection_idl\r
-\r
-module CosQueryCollection {\r
-\r
-  exception ElementInvalid {}; \r
-  exception IteratorInvalid {}; \r
-  exception PositionInvalid {};\r
-\r
-  typedef string Istring; \r
-  struct NVPair {\r
-    Istring name; \r
-    any value;\r
-  }; \r
-\r
-  typedef sequence ParameterList;\r
-\r
-  interface Collection; \r
-  interface Iterator;\r
-\r
-  interface CollectionFactory { \r
-    Collection create (in ParameterList params); \r
-  };\r
-\r
-  interface Collection { \r
-\r
-    readonly attribute long cardinality;\r
-\r
-    void add_element (in any element) \r
-      raises(ElementInvalid); \r
-\r
-    void add_all_elements (in Collection elements)  \r
-      raises(ElementInvalid);\r
-\r
-    void insert_element_at (in any element, in Iterator where)  \r
-      raises(IteratorInvalid,\r
-        ElementInvalid);\r
-\r
-    void replace_element_at (in any element, in Iterator  where) \r
-      raises(IteratorInvalid,\r
-        PositionInvalid,\r
-        ElementInvalid);\r
-\r
-    void remove_element_at (in Iterator where)  \r
-      raises(IteratorInvalid,\r
-        PositionInvalid); \r
-\r
-    void remove_all_elements ();\r
-\r
-    any retrieve_element_at (in Iterator where)  \r
-      raises(IteratorInvalid,\r
-        PositionInvalid);\r
-\r
-    Iterator create_iterator ();\r
-\r
-  };\r
-\r
-  interface Iterator { \r
-    any next ()\r
-      raises(IteratorInvalid,\r
-        PositionInvalid);\r
-    void reset ();\r
-    boolean more (); \r
-  }; \r
-\r
-};\r
-\r
-#endif // CosQueryCollection_idl\r
-\r
+/* RCS $Id: CosQueryCollection.idl,v 1.2 2000/12/03 14:43:59 thomas Exp $
+ *
+ * ----------------------------------------------------------------------------
+ * This is unmarked software provided by the Object Management Group,Inc. (OMG)
+ * ----------------------------------------------------------------------------
+ */
+
+
+/**
+ * CosQueryCollection is the Common Object Services Specification query
+ * query colleciton module as it it appears in COSS1, v1.0.
+ */
+
+
+#ifndef CosQueryCollection_idl
+#define CosQueryCollection_idl
+
+module CosQueryCollection {
+
+  exception ElementInvalid {};
+  exception IteratorInvalid {};
+  exception PositionInvalid {};
+
+  typedef string Istring;
+  struct NVPair {
+    Istring name;
+    any value;
+  };
+
+  typedef sequence ParameterList;
+
+  interface Collection;
+  interface Iterator;
+
+  interface CollectionFactory {
+    Collection create (in ParameterList params);
+  };
+
+  interface Collection {
+
+    readonly attribute long cardinality;
+
+    void add_element (in any element)
+      raises(ElementInvalid);
+
+    void add_all_elements (in Collection elements)
+      raises(ElementInvalid);
+
+    void insert_element_at (in any element, in Iterator where)
+      raises(IteratorInvalid,
+        ElementInvalid);
+
+    void replace_element_at (in any element, in Iterator  where)
+      raises(IteratorInvalid,
+        PositionInvalid,
+        ElementInvalid);
+
+    void remove_element_at (in Iterator where)
+      raises(IteratorInvalid,
+        PositionInvalid);
+
+    void remove_all_elements ();
+
+    any retrieve_element_at (in Iterator where)
+      raises(IteratorInvalid,
+        PositionInvalid);
+
+    Iterator create_iterator ();
+
+  };
+
+  interface Iterator {
+    any next ()
+      raises(IteratorInvalid,
+        PositionInvalid);
+    void reset ();
+    boolean more ();
+  };
+
+};
+
+#endif // CosQueryCollection_idl
+
index 760108404a2e3310eca35e4d14866696ac5478c0..9e1e5d3063209f24ac161348072d1558fddff689 100644 (file)
 #pragma prefix ""
 
 module PostgreSQL {
-   
+
    // Built-in types
-   
+
    module Types {
        // Arrays in network order
        typedef short int2;
        typedef long int4;
        typedef long int8[2];
    };
-   
-   
+
+
    // NULL support
-   
+
    typedef boolean Null;
-   
+
    union Value switch (Null) {
      case FALSE: any value;
    };
-   
-   
+
+
    // Row definition
-   
+
    typedef sequence Row;
-   
+
    // 
    // More about the application of COSS:
-   // 
+   //
    // A Table will be a QueryableCollection of Rows
    // A Database will be a QueryableCollection of Tables
    // (Currently Tables are not exported... maybe later.)
    // Both will be queryable via the Query Service
-   // 
+   //
    // Other relations will be representable using the Relationship Service
    // This includes primary/foreign keys and anything else :)
-   // 
+   //
    // GRANT/REVOKE can be supplied via the Security Service
-   // 
+   //
    // See a pattern here? The whole of SQL can be implemented by these services!
    // The statements go through a parser. Queries and subqueries are passed to the
    // database for processing. Returned items are handled appropriately:
-   // 
+   //
    // SELECT: return the items to the caller
    // UPDATE: modify the items (direct)
    // DELETE: call delete() on each Row (direct)
    // GRANT/REVOKE: modify ACLs (via Security Service)
    // ALTER: modify the items (direct) and/or the relations (via Relationship Service)
    // etc.
-   // 
+   //
    // I'm not sure yet about LOCK and UNLOCK.
    // 
-   
+
    // Expirable object
-   
+
    interface Expirable {
        /* oneway? */ void keepalive();
        void remove();
    };
-   
-   
+
+
    // Upcall object
-   
+
    interface Upcall {
        void notice(in string message);
        void abort();
    };
-   
-       
+
+
    // Connected database object
-   
+
    interface Database : CosQuery::QueryableCollection, Expirable {
        void setupcall(in Upcall obj);
    };
-   
-   
+
+
    // Server object (stateless)
-   
+
    interface Server {
        Database connect(in string db, in string user, in string password);
    };
index dff13287a8d76f32c9793da70c32d7ddd189214e..61ff77c69f399805c1a7e05a32da60cb2b4e2116 100644 (file)
@@ -1,59 +1,59 @@
-#include \r
-#include "pgsql_int.h"\r
-\r
-bool terminate = false;\r
-\r
-int main(int argc, char *argv)\r
-{\r
-   CORBA::ORB_var orb = CORBA::ORB_init(argc,argv,"");\r
-   PortableManager::POA_var poa = PortableServer::POA::_narrow(orb->resolve_initial_references("RootPOA"));\r
-   PortableManager::POAManager_var mgr = poa->the_POAManager();\r
-   \r
-   Server_impl *server = new Server_impl;\r
-   poa->activate_object(server);\r
-   \r
-   CosNaming::NamingContext_var ctx = CosNaming::NamingContext::_narrow(orb->resolve_initial_references("NamingService"));\r
-   CosNaming::Name_var n = new CosNaming::Name(1);\r
-   n[0].id("PostgreSQL");\r
-   n[0].name("service");\r
-   bool bindok = false;\r
-   \r
-   if (!CORBA::Object::is_nil(ctx)) {\r
-       try {\r
-           CosNaming::NamingContext_var myctx = ctx->bind_new_context(n);\r
-           CosNaming::Name_var n2 = new CosNaming::Name(1);\r
-           n2[0].id("Server");\r
-           n2[0].name("Server");\r
-           myctx->bind(n2,server->_this());\r
-           bindok = true;\r
-       } catch (CORBA::Exception &e) {\r
-           cerr << "Warning: Naming Service bind failed" << endl;\r
-           bindok = false;\r
-       }\r
-   } else {\r
-       cerr << "Warning: Naming Service not found" << endl;\r
-   }\r
-   \r
-   mgr->activate();\r
-   while (!terminate) {\r
-       if (orb->work_pending())\r
-           orb->perform_work();\r
-       if (expiry_needed())\r
-           expire_now();\r
-   }\r
-   \r
-   if (!CORBA::Object::is_nil(ctx) && bindok) {\r
-       try {\r
-           CosNaming::NamingContext myctx = ctx->resolve(n);\r
-           ctx->unbind(n);\r
-           myctx->destroy();\r
-       } catch (CORBA::Exception &e) {\r
-           cerr << "Warning: Naming Service unbind failed" << endl;\r
-       }\r
-   }\r
-   \r
-   orb->shutdown(true);\r
-   \r
-   delete server;\r
-   return 0;\r
-}\r
+#include 
+#include "pgsql_int.h"
+
+bool terminate = false;
+
+int main(int argc, char *argv)
+{
+   CORBA::ORB_var orb = CORBA::ORB_init(argc,argv,"");
+   PortableManager::POA_var poa = PortableServer::POA::_narrow(orb->resolve_initial_references("RootPOA"));
+   PortableManager::POAManager_var mgr = poa->the_POAManager();
+
+   Server_impl *server = new Server_impl;
+   poa->activate_object(server);
+
+   CosNaming::NamingContext_var ctx = CosNaming::NamingContext::_narrow(orb->resolve_initial_references("NamingService"));
+   CosNaming::Name_var n = new CosNaming::Name(1);
+   n[0].id("PostgreSQL");
+   n[0].name("service");
+   bool bindok = false;
+
+   if (!CORBA::Object::is_nil(ctx)) {
+       try {
+           CosNaming::NamingContext_var myctx = ctx->bind_new_context(n);
+           CosNaming::Name_var n2 = new CosNaming::Name(1);
+           n2[0].id("Server");
+           n2[0].name("Server");
+           myctx->bind(n2,server->_this());
+           bindok = true;
+       } catch (CORBA::Exception &e) {
+           cerr << "Warning: Naming Service bind failed" << endl;
+           bindok = false;
+       }
+   } else {
+       cerr << "Warning: Naming Service not found" << endl;
+   }
+
+   mgr->activate();
+   while (!terminate) {
+       if (orb->work_pending())
+           orb->perform_work();
+       if (expiry_needed())
+           expire_now();
+   }
+
+   if (!CORBA::Object::is_nil(ctx) && bindok) {
+       try {
+           CosNaming::NamingContext myctx = ctx->resolve(n);
+           ctx->unbind(n);
+           myctx->destroy();
+       } catch (CORBA::Exception &e) {
+           cerr << "Warning: Naming Service unbind failed" << endl;
+       }
+   }
+
+   orb->shutdown(true);
+
+   delete server;
+   return 0;
+}