home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / sdsmcod.idl < prev    next >
Encoding:
Text File  |  1996-02-22  |  5.3 KB  |  151 lines

  1. #ifndef DatastoreODBC_idl
  2. #define DatastoreODBC_idl
  3.  
  4. #include <somcls.idl>
  5. #include <sdsmcbs.idl>
  6. #include <sdsexc.idl>
  7.  
  8. /***********************************************
  9.  
  10.     Licensed Materials - Property of IBM
  11.  
  12.     5622-880   5801-AAR
  13.  
  14.     (c) Copyright IBM Corp 1991, 1996.
  15.  
  16. ************************************************/
  17.  
  18. interface DatastoreODBC;
  19.  
  20. interface DatastoreODBCFactory : SOMClass {
  21.  
  22.     DatastoreODBC create_object();
  23.     DatastoreODBC create_object_defaults(in string datastore_name,
  24.                                          in string connect_string);
  25.  
  26.     #ifdef __SOMIDL__
  27.     implementation {
  28.  
  29.         releaseorder : create_object,
  30.                        create_object_defaults;
  31.     passthru C_xh = "#ifndef __TOS_WIN__                         "
  32.                     " #ifndef __NO_DEFAULT_LIBS__                "
  33.                     "   #pragma library(\"SOMTK.LIB\")           "
  34.                     "   #ifdef __IMPORTLIB__                     "
  35.                     "      #pragma library(\"CPPOAI3I.LIB\")     "
  36.                     "   #else                                    "
  37.                     "      #pragma library(\"CPPOAI3.LIB\")      "
  38.                     "   #endif                                   "
  39.                     " #endif                                     "
  40.                     "#else                                       "
  41.                     " #ifndef __NO_DEFAULT_LIBS__                "
  42.                     "   #pragma library(\"SOMTK.LIB\")           "
  43.                     "   #ifdef __IMPORTLIB__                     "
  44.                     "      #pragma library(\"CPPWAI3I.LIB\")     "
  45.                     "   #else                                    "
  46.                     "      #pragma library(\"CPPWAI3.LIB\")      "
  47.                     "   #endif                                   "
  48.                     " #endif                                     "
  49.                     "#endif                                      "
  50.                     "#include <idaxbs.h>                         ";
  51.     passthru C_h =  "#ifndef __TOS_WIN__                         "
  52.                     " #ifndef __NO_DEFAULT_LIBS__                "
  53.                     "   #pragma library(\"SOMTK.LIB\")           "
  54.                     "   #ifdef __IMPORTLIB__                     "
  55.                     "      #pragma library(\"CPPOAI3I.LIB\")     "
  56.                     "   #else                                    "
  57.                     "      #pragma library(\"CPPOAI3.LIB\")      "
  58.                     "   #endif                                   "
  59.                     " #endif                                     "
  60.                     "#else                                       "
  61.                     " #ifndef __NO_DEFAULT_LIBS__                "
  62.                     "   #pragma library(\"SOMTK.LIB\")           "
  63.                     "   #ifdef __IMPORTLIB__                     "
  64.                     "      #pragma library(\"CPPWAI3I.LIB\")     "
  65.                     "   #else                                    "
  66.                     "      #pragma library(\"CPPWAI3.LIB\")      "
  67.                     "   #endif                                   "
  68.                     " #endif                                     "
  69.                     "#endif                                      "
  70.                     "#include <idaxbs.h>                         ";
  71.  
  72.        #ifndef WIN_NT_BUILD
  73.          dllname = "cppoai3i.dll";
  74.        #else
  75.          dllname = "cppwai3i.dll";
  76.        #endif
  77.  
  78.     };
  79.     #endif
  80.  
  81. };
  82.  
  83. interface DatastoreODBC : DatastoreBase {
  84.  
  85.   attribute long access_mode;
  86.   attribute long auto_commit;
  87.   attribute long isolation_level;
  88.  
  89.   long get_driver_prompt();
  90.   void set_driver_prompt(in long option, in void* hwnd);
  91.   string get_connect_string();
  92.   void set_connect_string(in string connect_string);
  93.  
  94.   void
  95.       connect_string ( in string datastore_name,
  96.                        in string connect_stringi,
  97.                        in string user_name,
  98.                        in string authentication);
  99.  
  100. #ifdef __PRIVATE__
  101.   void* get_environment_handle();
  102.   void* get_connection_handle();
  103. #endif
  104.  
  105.    #ifdef __SOMIDL__
  106.    implementation
  107.    {
  108.  
  109. #ifdef __PRIVATE__
  110.         void* environment_handle;
  111.         void* connection_handle;
  112. #endif
  113.  
  114.       releaseorder:
  115.                     get_connect_string,
  116.                     set_connect_string,
  117.                     connect_string,
  118.                     _get_access_mode,
  119.                     _set_access_mode,
  120.                     _get_auto_commit,
  121.                     _set_auto_commit,
  122.                     get_driver_prompt,
  123.                     set_driver_prompt,
  124.                     get_environment_handle,
  125.                     get_connection_handle,
  126.                     _get_isolation_level,
  127.                     _set_isolation_level;
  128.  
  129.       access_mode: noset, noget, nodata;
  130.       auto_commit: noset, noget, nodata;
  131.       isolation_level: noset, noget, nodata;
  132.  
  133.       metaclass = DatastoreODBCFactory;
  134.  
  135.       passthru C_xih = "#include \"sdsmcod.xh\"";
  136.        #ifndef WIN_NT_BUILD
  137.          dllname = "cppoai3i.dll";
  138.        #else
  139.          dllname = "cppwai3i.dll";
  140.        #endif
  141.  
  142.       somInit: override;
  143.       somUninit: override;
  144.    };
  145.    #endif
  146.  
  147.  
  148. };
  149. #endif
  150.  
  151.