home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / db02_src.zip / dclient.h < prev    next >
C/C++ Source or Header  |  1993-11-05  |  3KB  |  90 lines

  1. /**************************************************************************
  2.  * Source Id :
  3.  *
  4.  * $Id: dclient.h,v 1.5 1993/10/13 10:26:28 daz Exp $
  5.  *-------------------------------------------------------------------------
  6.  * Project Notes :
  7.  *
  8.  *  Diamond Base
  9.  *  ============
  10.  *      A solid database implementation, spurred on by the continuing
  11.  *  Metal (Lead) Base saga.
  12.  *
  13.  *  Project Team :
  14.  *        A. Davison
  15.  *        K. Lentin
  16.  *        D. Platt
  17.  *
  18.  *    Project Commenced : 05-02-1993
  19.  *
  20.  *-------------------------------------------------------------------------
  21.  *  Module Notes :
  22.  *     Defines a multi diamondBase object in the client for the
  23.  *     multi-db
  24.  *  Original Author : daz.
  25.  *
  26.  *-------------------------------------------------------------------------
  27.  * Revision History:
  28.  *
  29.  * $Log: dclient.h,v $
  30.  * Revision 1.5  1993/10/13  10:26:28  daz
  31.  * *** empty log message ***
  32.  *
  33.  * Revision 1.4  1993/07/21  14:25:42  daz
  34.  * *** empty log message ***
  35.  *
  36.  * Revision 1.3  1993/07/04  16:08:03  daz
  37.  * *** empty log message ***
  38.  *
  39.  * Revision 1.2  1993/07/04  13:42:19  daz
  40.  * *** empty log message ***
  41.  *
  42.  * Revision 1.1  1993/07/04  02:21:13  daz
  43.  * Initial revision
  44.  *
  45.  **************************************************************************/
  46.  
  47. #ifndef __mclient_h__
  48. #define __mclient_h__
  49.  
  50. #include "defs.h"
  51. #include "dcdefs.h"
  52. // Message ids for communication between clients and server
  53.  
  54. // Dummy class defintion - the
  55. // single user version allows data to be registered with the
  56. // dbObjs - but we aren't premitting this in the multi user
  57. // version. But, it's a defined part of the diamondBase interface
  58. // unfortunately, so we must provide it.
  59.  
  60. class dbObjData {
  61.     public:
  62. };
  63.  
  64. class diamondBase
  65. {
  66.     public:
  67.         enum transId {ti_add,ti_del,ti_begin,ti_end,ti_get,ti_put,ti_extract,
  68.             ti_seekFirst,ti_first,ti_next,ti_prev,ti_seekLast,ti_last,
  69.             ti_peekNext,ti_peekPrev,ti_seek,ti_find,ti_stats,ti_write};
  70.  
  71.         char* verStr(void);
  72.         char* version(bool full = false);
  73.         diamondBase(char* name = 0);
  74.         dbError detach(long refId);
  75.         dbError attach(const char* name, object* resBuffer, long& refId,
  76.             dbObjData *&);
  77.         dbError trans(long refId,transId id,long idx=0);
  78.         ~diamondBase();
  79.     private:
  80.         long    msqId; // Id for connection to server
  81.         long    shmId; // Id for memory transfer to server
  82.         long    sendChannel;
  83.         long    recChannel;
  84.         void    sendLong(long);
  85.         bool    sendMess(void *,long len,long chan=-1);
  86.         bool    recMess(void *,long len);
  87.         char    *transArea; // Data transfer area to server.
  88. };
  89. #endif
  90.