home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Collection - Online Library - January 1996 / CKITOS2196.ISO / diskette / gg244090.dsk / unc.dsk / CHAPTER.10 / DB.IDL < prev    next >
Text File  |  1993-08-04  |  3KB  |  73 lines

  1. /*****************************************************************************/
  2. /* Module: database.idl                                                      */
  3. /*                                                                           */
  4. /* Description:                                                              */
  5. /*    This IDL file defines the interface named "Database", which provides   */
  6. /*    the following RPC operations:                                          */
  7. /*                                                                           */
  8. /*             db_open         establishes the connection to a database      */
  9. /*             db_close        detaches the connection                       */
  10. /*             db_read         reads a record from the current position      */
  11. /*             db_setpos       sets the current position                     */
  12. /*             db_getpos       gets the current position                     */
  13. /*                                                                           */
  14. /*    This file also define the following types:                             */
  15. /*                                                                           */
  16. /*             db_context_t    identifies the connection to a database       */
  17. /*             db_data_t       defines a record to be read by db_read()      */
  18. /*                                                                           */
  19. /*****************************************************************************/
  20. [
  21.    uuid(0039FBC0-3C08-1C22-9300-10005AA85812),
  22.    version(1.0)
  23. ]
  24. interface Database
  25.  
  26. {
  27.    /**************************************************************************/
  28.    /* Defining types                                                         */
  29.    /**************************************************************************/
  30.    const char *ENTRY_NAME = "/.:/Servers/Database";
  31.    const long  MAX_DB_DATA_SIZE = 64;
  32.  
  33.    typedef [ context_handle ] void *db_context_t;
  34.  
  35.    typedef struct _db_data_t {
  36.       long size;
  37.       char data[ MAX_DB_DATA_SIZE ];
  38.    } db_data_t;
  39.  
  40.    /**************************************************************************/
  41.    /* Defining RPC operations                                                */
  42.    /**************************************************************************/
  43.    void db_open(
  44.       [ in  ]         handle_t         binding_h,
  45.       [ out ]         db_context_t    *pcontext_h,
  46.       [ out ]         error_status_t  *pst );
  47.  
  48.    void db_close(
  49.       [ in, out ]     db_context_t    *pcontext_h,
  50.       [ out ]         error_status_t  *pst );
  51.  
  52.  
  53.    void db_read(
  54.       [ in  ]         db_context_t     context_h,
  55.       [ out ]         db_data_t       *pdata,
  56.       [ out ]         long            *ppos,
  57.       [ out ]         error_status_t  *pst );
  58.  
  59.  
  60.    void db_setpos(
  61.       [ in  ]         db_context_t     context_h,
  62.       [ in  ]         long            *ppos,
  63.       [ out ]         error_status_t  *pst );
  64.  
  65.  
  66.    void db_getpos(
  67.       [ in  ]         db_context_t     context_h,
  68.       [ out ]         long            *ppos,
  69.       [ out ]         error_status_t  *pst );
  70.  
  71. }
  72.  
  73.