home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / tema / SW602 / Winbase / data1.cab / SDK_Files / C-lang / C.L1 / WBKERNEL.H < prev    next >
Encoding:
C/C++ Source or Header  |  2000-03-16  |  27.0 KB  |  507 lines

  1. /****************************************************************************/
  2. /* wbkernel.h - definice pro komunikaci se serverem WinBase602              */
  3. /* (C) Janus Drozd, 1992, 93, 94, 95, 96, 97, 98, 99, 2000                  */
  4. /* verze: 6.0, 6.1 (32-bit)                                                 */
  5. /****************************************************************************/
  6. #ifndef __WBKERNEL_H__
  7. #define __WBKERNEL_H__
  8.  
  9. #include "general.h"
  10. #include "cdp.h"
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16.   // organizacni funkce:
  17. DllKernel void  WINAPI start_package   (void);
  18. DllKernel void  WINAPI send_package    (void);
  19. DllKernel void  WINAPI concurrent      (BOOL state);
  20. DllKernel BOOL  WINAPI answered        (void);
  21. DllKernel BOOL  WINAPI waiting         (sig32 timeout);
  22.  
  23.   // Chyby a varovani:
  24. DllKernel int   WINAPI Sz_error        (void);
  25. DllKernel int   WINAPI Sz_warning      (void);
  26.  
  27.   // Vyhledani objektu:
  28. DllKernel BOOL WINAPI Find2_object(const char * name, const uns8 * appl_id, tcateg category, tobjnum * position);
  29. DllKernel BOOL WINAPI Find_object (const char * name, tcateg category, tobjnum * position);
  30. DllKernel BOOL WINAPI Find_object_by_id(const WBUUID uuid, tcateg category, tobjnum * position);
  31.  
  32.   // Prace s kurzory:
  33. DllKernel BOOL WINAPI Open_cursor        (tobjnum cursdef, tcursnum * curs);
  34. DllKernel BOOL WINAPI Open_cursor_direct (const char * query, tcursnum * curs);
  35. DllKernel BOOL WINAPI Close_cursor       (tcursnum curs);
  36. DllKernel BOOL WINAPI Open_subcursor     (tcursnum supercurs, const char * subcurdef, tcursnum * subcurs);
  37. DllKernel BOOL WINAPI Add_record(tcursnum curs, trecnum * recs, int numofrecs);
  38. DllKernel BOOL WINAPI Super_recnum(tcursnum subcursor, tcursnum supercursor,
  39.                           trecnum subrecnum, trecnum * superrecnum);
  40. DllKernel BOOL WINAPI Translate(tcursnum curs, trecnum crec, int tbord, trecnum * trec);
  41. DllKernel BOOL WINAPI Query_optimization(const char * query, char * buf, int bufsize);
  42.  
  43.   // Prace se zaznamy:
  44. DllKernel trecnum WINAPI Append(tcurstab curs);
  45. DllKernel trecnum WINAPI Insert(tcurstab curs);
  46. DllKernel trecnum WINAPI Look_up(tcursnum curs, const char * attrname, void * res);
  47. DllKernel BOOL WINAPI Delete             (tcurstab  curs,  trecnum position);
  48. DllKernel BOOL WINAPI Undelete           (ttablenum table, trecnum position);
  49. DllKernel BOOL WINAPI Delete_all_records (tcursnum curs);
  50. DllKernel BOOL WINAPI Rec_cnt            (tcurstab curs, trecnum * recnum);
  51.  
  52.   // Cteni a zapis dat:
  53. DllKernel BOOL WINAPI Read         (tcurstab cursnum, trecnum position,
  54.   tattrib attr, const modifrec * access, void * buffer);
  55. DllKernel BOOL WINAPI Write        (tcurstab cursnum, trecnum position,
  56.   tattrib attr, const modifrec * access, const void * buffer, uns16 datasize);
  57. DllKernel BOOL WINAPI Read_ind     (tcurstab cursnum, trecnum position,
  58.   tattrib attr, uns16 index, void * data);
  59. DllKernel BOOL WINAPI Write_ind    (tcurstab cursnum, trecnum position,
  60.   tattrib attr, uns16 index, void * data, uns16 datasize);
  61. DllKernel BOOL WINAPI Read_ind_cnt (tcurstab cursnum, trecnum position,
  62.   tattrib attr, uns16 * count);
  63. DllKernel BOOL WINAPI Write_ind_cnt(tcurstab cursnum, trecnum position,
  64.   tattrib attr, uns16 count);
  65. DllKernel BOOL WINAPI Read_var     (tcurstab cursnum, trecnum position,
  66.   tattrib attr, uns16 index, uns32 start, uns32 size, void * buf, uns32 * psize);
  67. DllKernel BOOL WINAPI Write_var    (tcurstab cursnum, trecnum position,
  68.   tattrib attr, uns16 index, uns32 start, uns32 size, const void * buf);
  69. DllKernel BOOL WINAPI Read_len     (tcurstab cursnum, trecnum position,
  70.   tattrib attr, uns16 index, uns32 * size);
  71. DllKernel BOOL WINAPI Write_len    (tcurstab cursnum, trecnum position,
  72.   tattrib attr, uns16 index, uns32 size);
  73. DllKernel BOOL WINAPI Read_record  (tcurstab cursnum, trecnum position,
  74.   void * buf, uns16 datasize);
  75. DllKernel BOOL WINAPI Write_record (tcurstab cursnum, trecnum position,
  76.   const void * buf, uns16 datasize);
  77.  
  78.   // prava:
  79. DllKernel BOOL WINAPI GetSet_privils(tobjnum user_group_role,
  80.   tcateg subject_categ, ttablenum table, trecnum recnum, t_oper operation,
  81.   uns8 * privils);
  82.  
  83.   // transakce:
  84. DllKernel BOOL WINAPI Start_transaction  (void);
  85. DllKernel BOOL WINAPI Commit             (void);
  86. DllKernel BOOL WINAPI Roll_back          (void);
  87. DllKernel BOOL WINAPI Set_transaction_isolation_level(t_isolation level);
  88.  
  89.   // zamky:
  90. DllKernel BOOL WINAPI Read_lock_record   (tcurstab curs, trecnum position);
  91. DllKernel BOOL WINAPI Read_unlock_record (tcurstab curs, trecnum position);
  92. DllKernel BOOL WINAPI Write_lock_record  (tcurstab curs, trecnum position);
  93. DllKernel BOOL WINAPI Write_unlock_record(tcurstab curs, trecnum position);
  94. DllKernel BOOL WINAPI Read_lock_table    (tcurstab curs);
  95. DllKernel BOOL WINAPI Read_unlock_table  (tcurstab curs);
  96. DllKernel BOOL WINAPI Write_lock_table   (tcurstab curs);
  97. DllKernel BOOL WINAPI Write_unlock_table (tcurstab curs);
  98.  
  99.   // prace s objekty:
  100. DllKernel BOOL WINAPI Insert_object(const char * name, tcateg category, tobjnum * objnum);
  101. DllKernel BOOL WINAPI Relist_objects(void);
  102. DllKernel BOOL WINAPI GetSet_group_role(tobjnum user_or_group,
  103.   tobjnum group_or_role, tcateg subject2, t_oper operation, uns32 * relation);
  104. DllKernel BOOL WINAPI Create_user(const char * logname,
  105.   const char * name1, const char * name2, const char * name3,
  106.   const char * identif,  const WBUUID homesrv,
  107.   const char * password, tobjnum * objnum);
  108. DllKernel BOOL WINAPI Set_password(const char * reserved, const char * password);
  109. DllKernel BOOL WINAPI Create_link(const char * sourcename,
  110.            const char * sourceappl, tcateg category, const char * linkname);
  111. DllKernel BOOL WINAPI Create2_link(const char * sourcename,
  112.            const uns8 * sourceapplid, tcateg category, const char * linkname);
  113. DllKernel BOOL WINAPI Set_appl_starter(tcateg categ, const char * objname);
  114.  
  115.   // sledovani stavu
  116. DllKernel sig32  WINAPI Available_memory(BOOL local);
  117. DllKernel sig32  WINAPI Used_memory(BOOL local);
  118. DllKernel int    WINAPI Owned_cursors(void);
  119. DllKernel BOOL   WINAPI Database_integrity(BOOL repair,
  120.            uns32 * lost_blocks, uns32 * lost_dheap,
  121.            uns32 * nonex_blocks, uns32 * cross_link, uns32 * damaged_tabdef);
  122. DllKernel BOOL   WINAPI Get_info(kernel_info * kinf);
  123. DllKernel BOOL   WINAPI GetSet_fil_size  (t_oper operation, uns32 * size);
  124. DllKernel BOOL   WINAPI GetSet_fil_blocks(t_oper operation, uns32 * size);
  125. DllKernel char * WINAPI Who_am_I     (void);
  126. DllKernel BOOL   WINAPI Am_I_db_admin  (void);
  127. DllKernel sig32  WINAPI WinBase602_version(void);
  128. DllKernel void   WINAPI Enable_task_switch(BOOL enable);
  129. DllKernel BOOL   WINAPI Compact_database(int margin);
  130. DllKernel BOOL   WINAPI Log_write(const char * text);
  131. DllKernel BOOL   WINAPI Connection_speed_test(int * requests, int * kbytes);
  132. DllKernel BOOL   WINAPI Appl_inst_count(uns32 * count);
  133. DllKernel BOOL   WINAPI Get_logged_user(int index, char * username, char * applname, int * state);
  134. DllKernel BOOL   WINAPI Get_server_info(int info_type, void * buffer, unsigned buffer_size);
  135.  
  136.   // obalka aplikace v externim jazyce
  137. DllKernel void  WINAPI cdp_init        (cdp_t cdp);
  138. DllKernel sig32 WINAPI cdp_size        (void);
  139. DllKernel cdp_t WINAPI cdp_alloc       (void);
  140. DllKernel void  WINAPI cdp_free        (cdp_t cdp);
  141. DllKernel int   WINAPI link_kernel     (const char * path, int display);
  142. DllKernel void  WINAPI unlink_kernel   (void);
  143. DllKernel int   WINAPI interf_init     (cdp_t cdp, int user);
  144. DllKernel void  WINAPI interf_close    (void);
  145. DllKernel void  WINAPI core_release    (void);
  146. DllKernel BOOL  WINAPI Login           (const char * username, const char * password);
  147. DllKernel BOOL  WINAPI Logout          (void);
  148. DllKernel BOOL  WINAPI Set_application (const char * applname);
  149.  
  150.   // jine funkce serveru:
  151. DllKernel BOOL WINAPI SQL_execute(const char * statement, uns32 * results);
  152. DllKernel BOOL WINAPI SQL_prepare(const char * statement, uns32 * handle);
  153. DllKernel BOOL WINAPI SQL_exec_prepared(uns32 handle, uns32 * results, int * count);
  154. DllKernel BOOL WINAPI SQL_drop(uns32 handle);
  155. DllKernel BOOL WINAPI Set_sql_option(uns32 optmask, uns32 optval);
  156. DllKernel BOOL WINAPI Break(void);
  157. DllKernel BOOL WINAPI Message_to_clients(const char * msg);
  158. DllKernel BOOL WINAPI Set_progress_report_modulus(unsigned modulus);
  159.  
  160.   // manipulace s tabulkou:
  161. DllKernel BOOL WINAPI Enable_index(ttablenum table, int which, BOOL enable);
  162. DllKernel BOOL WINAPI Free_deleted(ttablenum table);
  163. DllKernel BOOL WINAPI Compact_table(ttablenum table);
  164.  
  165.   // agregacni funkce:
  166. DllKernel BOOL WINAPI C_sum  (tcursnum curs, const char * attrname,
  167.   const char * condition, void * result);
  168. DllKernel BOOL WINAPI C_max  (tcursnum curs, const char * attrname,
  169.   const char * condition, void * result);
  170. DllKernel BOOL WINAPI C_min  (tcursnum curs, const char * attrname,
  171.   const char * condition, void * result);
  172. DllKernel BOOL WINAPI C_count(tcursnum curs, const char * attrname,
  173.   const char * condition, trecnum * result);
  174. DllKernel BOOL WINAPI C_avg  (tcursnum curs, const char * attrname,
  175.   const char * condition, void * result);
  176.  
  177.   // ODBC:
  178. DllKernel BOOL  WINAPI ODBC_open_cursor      (uns32 connection,  tcursnum * curs,  const char * query);
  179. DllKernel uns32 WINAPI ODBC_find_connection  (const char * dsn_name);
  180. DllKernel uns32 WINAPI ODBC_create_connection(const char * dsn_name);
  181. DllKernel uns32 WINAPI ODBC_direct_connection(const char * conn_string);
  182.  
  183.   // informace o atributech:
  184. typedef BOOL (WINAPI enum_attr)(char * attrname, uns8 attrtype,
  185.                                      uns8 attrmult, uns16 attrspecif);
  186. DllKernel BOOL WINAPI Enum_attributes(ttablenum table, enum_attr * callback);
  187. DllKernel BOOL WINAPI Attribute_info(ttablenum table, const char * attrname,
  188.        tattrib * attrnum, uns8 * attrtype, uns8 * attrmult, uns16 * attrspecif);
  189.  
  190.   // podpisy a replikace:
  191. DllKernel BOOL WINAPI Signature(window_id hParent, tcursnum cursor, trecnum recnum, tattrib attr, BOOL create, void * param);
  192. DllKernel BOOL WINAPI Repl_control(int optype, int opparsize, void * opparam);
  193. DllKernel BOOL WINAPI Replicate(const char * ServerName, const char * ApplName, BOOL pull);
  194. DllKernel BOOL WINAPI Reset_replication(void);
  195. DllKernel BOOL WINAPI GetSet_next_user(tcurstab curs,
  196.   trecnum position, tattrib attr, t_oper operation, t_valtype valtype, void * value);
  197.  
  198.   // e-mail
  199. #define WBL_READRCPT   0x0001
  200. #define WBL_DELAFTER   0x0002
  201. #define WBL_PRILOW     0x0004
  202. #define WBL_PRIHIGH    0x0008
  203. #define WBL_SENSPERS   0x0010
  204. #define WBL_SENSPRIV   0x0020
  205. #define WBL_SENSCONF   0x0040
  206. #define WBL_REMSENDNOW 0x0080
  207. #define WBL_MSGINFILE  0x0100
  208. #define WBL_VIEWED     0x0200
  209. #define WBL_FAX        0x0400
  210. #define WBL_REMOTE     0x0800
  211. #define WBL_DELREQ     0x1000
  212.  
  213. #define WBMT_602       0x00000001
  214. #define WBMT_MAPI      0x00000002
  215. #define WBMT_SMTPOP3   0x00000004
  216. #define WBMT_602REM    0x00010000
  217. #define WBMT_602SP3    0x00020000
  218. #define WBMT_DIALUP    0x00040000
  219.  
  220. #define ATML_ID        1
  221. #define ATML_SUBJECT   2
  222. #define ATML_SENDER    3
  223. #define ATML_RECIPIENT 4
  224. #define ATML_CREDATE   5
  225. #define ATML_CRETIME   6
  226. #define ATML_RCVDATE   7
  227. #define ATML_RCVTIME   8
  228. #define ATML_SIZE      9 
  229. #define ATML_FILECNT   10
  230. #define ATML_FLAGS     11
  231. #define ATML_STAT      12
  232. #define ATML_MSGID     13
  233. #define ATML_BODY      14
  234.  
  235. #define ATMF_ID        1
  236. #define ATMF_NAME      2
  237. #define ATMF_SIZE      3
  238. #define ATMF_DATE      4
  239. #define ATMF_TIME      5
  240.  
  241. #define MBL_BODY       1
  242. #define MBL_FILES      2
  243.  
  244. #define MBS_NEW        0
  245. #define MBS_OLD        1
  246. #define MBS_DELETED    2
  247.  
  248. DllKernel DWORD WINAPI InitWBMail(char *Profile, char *PassWord);
  249. DllKernel DWORD WINAPI InitWBMail602(char *EmiPath, char *UserID, char *PassWord);
  250. DllKernel DWORD WINAPI InitWBMail602x(char *Profile);
  251. DllKernel void  WINAPI CloseWBMail(void);
  252.  
  253. DllKernel DWORD WINAPI LetterCreate(char *Subj, char *Msg, UINT Flags, DWORD *lpLetter);
  254. DllKernel DWORD WINAPI LetterAddAddr(DWORD Letter, char *Addr, char *Type, BOOL CC);
  255. DllKernel DWORD WINAPI LetterAddFile(DWORD Letter, char *fName);
  256. DllKernel DWORD WINAPI LetterSend(DWORD Letter);
  257. DllKernel DWORD WINAPI TakeMailToRemOffice(void);
  258. DllKernel void  WINAPI LetterCancel(DWORD Letter);
  259.  
  260. DllKernel DWORD WINAPI MailOpenInBox(LPDWORD lpMailBox);
  261. DllKernel DWORD WINAPI MailBoxLoad(DWORD MailBox, UINT Flags);
  262. DllKernel DWORD WINAPI MailBoxGetMsg(DWORD MailBox, DWORD MsgID);
  263. DllKernel DWORD WINAPI MailBoxGetFilInfo(DWORD MailBox, DWORD MsgID);
  264. DllKernel DWORD WINAPI MailBoxSaveFileAs(DWORD MailBox, DWORD MsgID, DWORD FilIdx, char *FilName, char *DstPath);
  265. DllKernel DWORD WINAPI MailBoxDeleteMsg(DWORD MailBox, DWORD MsgID, BOOL RecToo);
  266. DllExport DWORD WINAPI MailGetInBoxInfo(DWORD MailBox, char *mTblName, ttablenum *mTblNum, char *fTblName, ttablenum *fTblNum);
  267. DllExport void  WINAPI MailCloseInBox(DWORD MailBox);
  268. DllExport DWORD WINAPI MailGetType();
  269. DllExport DWORD WINAPI MailDial(char *PassWord);
  270. DllExport DWORD WINAPI MailHangUp();
  271.  
  272.   // typove konverze:
  273. DllKernel uns32 WINAPI Make_date  (int day, int month, int year);
  274. DllKernel int   WINAPI Day        (uns32 dt);
  275. DllKernel int   WINAPI Month      (uns32 dt);
  276. DllKernel int   WINAPI Year       (uns32 dt);
  277. DllKernel int   WINAPI Quarter    (uns32 dt);
  278. DllKernel uns32 WINAPI Today      (void);
  279. DllKernel uns32 WINAPI Make_time  (int hour, int minute, int second, int sec1000);
  280. DllKernel int   WINAPI Day_of_week(uns32 dt);
  281. DllKernel int   WINAPI Hours      (uns32 tm);
  282. DllKernel int   WINAPI Minutes    (uns32 tm);
  283. DllKernel int   WINAPI Seconds    (uns32 tm);
  284. DllKernel int   WINAPI Sec1000    (uns32 tm);
  285. DllKernel uns32 WINAPI Now        (void);
  286. DllKernel BOOL  WINAPI Like       (const char * s1, const char * s2);
  287. DllKernel BOOL  WINAPI Pref       (const char * s1, const char * s2);
  288. DllKernel BOOL  WINAPI Substr     (const char * s1, const char * s2);
  289. DllKernel void  WINAPI Upcase     (char * str);
  290. DllKernel double WINAPI money2real(monstr * m);
  291. DllKernel BOOL   WINAPI real2money(double d, monstr * m);
  292. DllKernel uns32 WINAPI timestamp2date    (uns32 dtm);
  293. DllKernel uns32 WINAPI timestamp2time    (uns32 dtm);
  294. DllKernel uns32 WINAPI datetime2timestamp(uns32 dt, uns32 tm);
  295. DllKernel void  WINAPI time2str     (uns32 tm,  char * txt, short param);
  296. DllKernel void  WINAPI date2str     (uns32 dt,  char * txt, short param);
  297. DllKernel void  WINAPI timestamp2str(uns32 dtm, char * txt, short param);
  298. DllKernel BOOL  WINAPI str2time     (char * txt, uns32 * tm);
  299. DllKernel BOOL  WINAPI str2date     (char * txt, uns32 * dt);
  300. DllKernel BOOL  WINAPI str2timestamp(char * txt, uns32 * dtm);
  301.  
  302.   // zastarale funkce
  303. DllKernel BOOL WINAPI Uninst_table (ttablenum table);
  304. DllKernel BOOL WINAPI Save_table   (ttablenum table, const char * filename);
  305. DllKernel BOOL WINAPI Restore_table(ttablenum table, const char * filename);
  306. DllKernel BOOL WINAPI Define_table (const char * name, const char * description);
  307. DllKernel BOOL WINAPI Get_object_rights(const char * objname, tcateg category,
  308.                           const char * username, tright * rights);
  309. DllKernel BOOL WINAPI Set_object_rights(const char * objname, tcateg category,
  310.                           const char * username, tright rights);
  311. DllKernel BOOL WINAPI Get_data_rights(ttablenum table, const char * username,
  312.                 tright * rights, tdright * rd_ri, tdright * wr_ri);
  313. DllKernel BOOL WINAPI Set_data_rights(ttablenum table, const char * username,
  314.                 tright rights, tdright rd_ri, tdright wr_ri);
  315. DllKernel BOOL WINAPI Create_group (const char * name);
  316. DllKernel BOOL WINAPI User_to_group(tobjnum user, tobjnum group, BOOL state);
  317. DllKernel BOOL WINAPI User_in_group(tobjnum user, tobjnum group, BOOL * state);
  318.  
  319. ////////////////////////////// varianta cd_ //////////////////////////////////
  320.  
  321.   // organizacni funkce:
  322. DllKernel void  WINAPI cd_start_package   (cdp_t cdp);
  323. DllKernel void  WINAPI cd_send_package    (cdp_t cdp);
  324. DllKernel void  WINAPI cd_concurrent      (cdp_t cdp, BOOL state);
  325. DllKernel BOOL  WINAPI cd_answered        (cdp_t cdp);
  326. DllKernel BOOL  WINAPI cd_waiting         (cdp_t cdp, sig32 timeout);
  327.  
  328.   // Chyby a varovani:
  329. DllKernel int   WINAPI cd_Sz_error        (cdp_t cdp);
  330. DllKernel int   WINAPI cd_Sz_warning      (cdp_t cdp);
  331. DllKernel BOOL  WINAPI Get_error_num_text (cdp_t cdp, int err, char * buf, unsigned buflen);
  332.  
  333.   // Vyhledani objektu:
  334. DllKernel BOOL WINAPI cd_Find2_object(cdp_t cdp, const char * name, const uns8 * appl_id, tcateg category, tobjnum * position);
  335. DllKernel BOOL WINAPI cd_Find_object (cdp_t cdp, const char * name, tcateg category, tobjnum * position);
  336. DllKernel BOOL WINAPI cd_Find_object_by_id(cdp_t cdp, const WBUUID uuid, tcateg category, tobjnum * position);
  337.  
  338.   // Prace s kurzory:
  339. DllKernel BOOL WINAPI cd_Open_cursor        (cdp_t cdp, tobjnum cursdef, tcursnum * curs);
  340. DllKernel BOOL WINAPI cd_Open_cursor_direct (cdp_t cdp, const char * query, tcursnum * curs);
  341. DllKernel BOOL WINAPI cd_Close_cursor       (cdp_t cdp, tcursnum curs);
  342. DllKernel BOOL WINAPI cd_Open_subcursor     (cdp_t cdp, tcursnum supercurs, const char * subcurdef, tcursnum * subcurs);
  343. DllKernel BOOL WINAPI cd_Add_record(cdp_t cdp, tcursnum curs, trecnum * recs, int numofrecs);
  344. DllKernel BOOL WINAPI cd_Super_recnum(cdp_t cdp, tcursnum subcursor, tcursnum supercursor,
  345.                           trecnum subrecnum, trecnum * superrecnum);
  346. DllKernel BOOL WINAPI cd_Translate(cdp_t cdp, tcursnum curs, trecnum crec, int tbord, trecnum * trec);
  347. DllKernel BOOL WINAPI cd_Query_optimization(cdp_t cdp, const char * query, char * buf, int bufsize);
  348.  
  349.   // Prace se zaznamy:
  350. DllKernel trecnum WINAPI cd_Append(cdp_t cdp, tcurstab curs);
  351. DllKernel trecnum WINAPI cd_Insert(cdp_t cdp, tcurstab curs);
  352. DllKernel trecnum WINAPI cd_Look_up(cdp_t cdp, tcursnum curs, const char * attrname, void * res);
  353. DllKernel BOOL WINAPI cd_Delete             (cdp_t cdp, tcurstab  curs,  trecnum position);
  354. DllKernel BOOL WINAPI cd_Undelete           (cdp_t cdp, ttablenum table, trecnum position);
  355. DllKernel BOOL WINAPI cd_Delete_all_records (cdp_t cdp, tcursnum curs);
  356. DllKernel BOOL WINAPI cd_Rec_cnt            (cdp_t cdp, tcurstab curs, trecnum * recnum);
  357.  
  358.   // Cteni a zapis dat:
  359. DllKernel BOOL WINAPI cd_Read         (cdp_t cdp, tcurstab cursnum, trecnum position,
  360.   tattrib attr, const modifrec * access, void * buffer);
  361. DllKernel BOOL WINAPI cd_Write        (cdp_t cdp, tcurstab cursnum, trecnum position,
  362.   tattrib attr, const modifrec * access, const void * buffer, uns16 datasize);
  363. DllKernel BOOL WINAPI cd_Read_ind     (cdp_t cdp, tcurstab cursnum, trecnum position,
  364.   tattrib attr, uns16 index, void * data);
  365. DllKernel BOOL WINAPI cd_Write_ind    (cdp_t cdp, tcurstab cursnum, trecnum position,
  366.   tattrib attr, uns16 index, void * data, uns16 datasize);
  367. DllKernel BOOL WINAPI cd_Read_ind_cnt (cdp_t cdp, tcurstab cursnum, trecnum position,
  368.   tattrib attr, uns16 * count);
  369. DllKernel BOOL WINAPI cd_Write_ind_cnt(cdp_t cdp, tcurstab cursnum, trecnum position,
  370.   tattrib attr, uns16 count);
  371. DllKernel BOOL WINAPI cd_Read_var     (cdp_t cdp, tcurstab cursnum, trecnum position,
  372.   tattrib attr, uns16 index, uns32 start, uns32 size, void * buf, uns32 * psize);
  373. DllKernel BOOL WINAPI cd_Write_var    (cdp_t cdp, tcurstab cursnum, trecnum position,
  374.   tattrib attr, uns16 index, uns32 start, uns32 size, const void * buf);
  375. DllKernel BOOL WINAPI cd_Read_len     (cdp_t cdp, tcurstab cursnum, trecnum position,
  376.   tattrib attr, uns16 index, uns32 * size);
  377. DllKernel BOOL WINAPI cd_Write_len    (cdp_t cdp, tcurstab cursnum, trecnum position,
  378.   tattrib attr, uns16 index, uns32 size);
  379. DllKernel BOOL WINAPI cd_Read_record  (cdp_t cdp, tcurstab cursnum, trecnum position,
  380.   void * buf, uns16 datasize);
  381. DllKernel BOOL WINAPI cd_Write_record (cdp_t cdp, tcurstab cursnum, trecnum position,
  382.   const void * buf, uns16 datasize);
  383.  
  384.   // prava:
  385. DllKernel BOOL WINAPI cd_GetSet_privils(cdp_t cdp, tobjnum user_group_role,
  386.   tcateg subject_categ, ttablenum table, trecnum recnum, t_oper operation,
  387.   uns8 * privils);
  388.  
  389.   // transakce:
  390. DllKernel BOOL WINAPI cd_Start_transaction  (cdp_t cdp);
  391. DllKernel BOOL WINAPI cd_Commit             (cdp_t cdp);
  392. DllKernel BOOL WINAPI cd_Roll_back          (cdp_t cdp);
  393. DllKernel BOOL WINAPI cd_Set_transaction_isolation_level(cdp_t cdp, t_isolation level);
  394.  
  395.   // zamky:
  396. DllKernel BOOL WINAPI cd_Read_lock_record   (cdp_t cdp, tcurstab curs, trecnum position);
  397. DllKernel BOOL WINAPI cd_Read_unlock_record (cdp_t cdp, tcurstab curs, trecnum position);
  398. DllKernel BOOL WINAPI cd_Write_lock_record  (cdp_t cdp, tcurstab curs, trecnum position);
  399. DllKernel BOOL WINAPI cd_Write_unlock_record(cdp_t cdp, tcurstab curs, trecnum position);
  400. DllKernel BOOL WINAPI cd_Read_lock_table    (cdp_t cdp, tcurstab curs);
  401. DllKernel BOOL WINAPI cd_Read_unlock_table  (cdp_t cdp, tcurstab curs);
  402. DllKernel BOOL WINAPI cd_Write_lock_table   (cdp_t cdp, tcurstab curs);
  403. DllKernel BOOL WINAPI cd_Write_unlock_table (cdp_t cdp, tcurstab curs);
  404.  
  405.   // prace s objekty:
  406. DllKernel BOOL WINAPI cd_Insert_object(cdp_t cdp, const char * name, tcateg category, tobjnum * objnum);
  407. DllKernel BOOL WINAPI cd_Relist_objects(cdp_t cdp);
  408. DllKernel BOOL WINAPI cd_Relist_objects_ex(cdp_t cdp, BOOL extended);
  409. DllKernel BOOL WINAPI cd_GetSet_group_role(cdp_t cdp, tobjnum user_or_group,
  410.   tobjnum group_or_role, tcateg subject2, t_oper operation, uns32 * relation);
  411. DllKernel BOOL WINAPI cd_Create_user(cdp_t cdp, const char * logname,
  412.   const char * name1, const char * name2, const char * name3,
  413.   const char * identif,  const WBUUID homesrv,
  414.   const char * password, tobjnum * objnum);
  415. DllKernel BOOL WINAPI cd_Set_password(cdp_t cdp, const char * reserved, const char * password);
  416. DllKernel BOOL WINAPI cd_Create_link(cdp_t cdp, const char * sourcename,
  417.            const char * sourceappl, tcateg category, const char * linkname);
  418. DllKernel BOOL WINAPI cd_Create2_link(cdp_t cdp, const char * sourcename,
  419.            const uns8 * sourceapplid, tcateg category, const char * linkname);
  420. DllKernel BOOL WINAPI cd_Set_appl_starter(cdp_t cdp, tcateg categ, const char * objname);
  421.  
  422.   // sledovani stavu
  423. DllKernel sig32  WINAPI cd_Available_memory(cdp_t cdp, BOOL local);
  424. DllKernel sig32  WINAPI cd_Used_memory(cdp_t cdp, BOOL local);
  425. DllKernel int    WINAPI cd_Owned_cursors(cdp_t cdp);
  426. DllKernel BOOL   WINAPI cd_Database_integrity(cdp_t cdp, BOOL repair,
  427.            uns32 * lost_blocks, uns32 * lost_dheap,
  428.            uns32 * nonex_blocks, uns32 * cross_link, uns32 * damaged_tabdef);
  429. DllKernel BOOL   WINAPI cd_Get_info(cdp_t cdp, kernel_info * kinf);
  430. DllKernel BOOL   WINAPI cd_GetSet_fil_size  (cdp_t cdp, t_oper operation, uns32 * size);
  431. DllKernel BOOL   WINAPI cd_GetSet_fil_blocks(cdp_t cdp, t_oper operation, uns32 * size);
  432. DllKernel char * WINAPI cd_Who_am_I     (cdp_t cdp);
  433. DllKernel BOOL   WINAPI cd_Am_I_db_admin  (cdp_t cdp);
  434. DllKernel sig32  WINAPI cd_WinBase602_version(cdp_t cdp);
  435. DllKernel void   WINAPI cd_Enable_task_switch(cdp_t cdp, BOOL enable);
  436. DllKernel BOOL   WINAPI cd_Compact_database(cdp_t cdp, int margin);
  437. DllKernel BOOL   WINAPI cd_Log_write(cdp_t cdp, const char * text);
  438. DllKernel BOOL   WINAPI cd_Connection_speed_test(cdp_t cdp, int * requests, int * kbytes);
  439. DllKernel BOOL   WINAPI cd_Appl_inst_count(cdp_t cdp, uns32 * count);
  440. DllKernel BOOL   WINAPI cd_Get_logged_user(cdp_t cdp, int index, char * username, char * applname, int * state);
  441. DllKernel BOOL   WINAPI cd_Get_server_info(cdp_t cdp, int info_type, void * buffer, unsigned buffer_size);
  442. DllKernel void   WINAPI cd_Get_appl_info(cdp_t cdp, WBUUID appl_uuid, char * appl_name, char * server_name);
  443.  
  444.   // obalka aplikace v externim jazyce
  445. DllKernel void  WINAPI cd_interf_close   (cdp_t cdp);
  446. DllKernel int   WINAPI cd_connect        (cdp_t cdp, const char * serv_name, int show_type);
  447. DllKernel void  WINAPI cd_disconnect     (cdp_t cdp);
  448. DllKernel BOOL  WINAPI cd_Login          (cdp_t cdp, const char * username, const char * password);
  449. DllKernel BOOL  WINAPI cd_Logout         (cdp_t cdp);
  450. DllKernel BOOL  WINAPI cd_Set_application(cdp_t cdp, const char * applname);
  451. DllKernel BOOL  WINAPI cd_Set_application_ex(cdp_t cdp, const char * applname, BOOL extended);
  452.  
  453.   // jine funkce serveru:
  454. DllKernel BOOL WINAPI cd_SQL_execute(cdp_t cdp, const char * statement, uns32 * results);
  455. DllKernel BOOL WINAPI cd_SQL_prepare(cdp_t cdp, const char * statement, uns32 * handle);
  456. DllKernel BOOL WINAPI cd_SQL_exec_prepared(cdp_t cdp, uns32 handle, uns32 * results, int * count);
  457. DllKernel BOOL WINAPI cd_SQL_drop(cdp_t cdp, uns32 handle);
  458. DllKernel BOOL WINAPI cd_Set_sql_option(cdp_t cdp, uns32 optmask, uns32 optval);
  459. DllKernel BOOL WINAPI cd_Break(cdp_t cdp);
  460. DllKernel BOOL WINAPI cd_Message_to_clients(cdp_t cdp, const char * msg);
  461. DllKernel BOOL WINAPI cd_Set_progress_report_modulus(cdp_t cdp, unsigned modulus);
  462.  
  463.   // manipulace s tabulkou:
  464. DllKernel BOOL WINAPI cd_Enable_index(cdp_t cdp, ttablenum table, int which, BOOL enable);
  465. DllKernel BOOL WINAPI cd_Free_deleted(cdp_t cdp, ttablenum table);
  466. DllKernel BOOL WINAPI cd_Compact_table(cdp_t cdp, ttablenum table);
  467.  
  468.   // agregacni funkce:
  469. DllKernel BOOL WINAPI cd_C_sum  (cdp_t cdp, tcursnum curs, const char * attrname,
  470.   const char * condition, void * result);
  471. DllKernel BOOL WINAPI cd_C_max  (cdp_t cdp, tcursnum curs, const char * attrname,
  472.   const char * condition, void * result);
  473. DllKernel BOOL WINAPI cd_C_min  (cdp_t cdp, tcursnum curs, const char * attrname,
  474.   const char * condition, void * result);
  475. DllKernel BOOL WINAPI cd_C_count(cdp_t cdp, tcursnum curs, const char * attrname,
  476.   const char * condition, trecnum * result);
  477. DllKernel BOOL WINAPI cd_C_avg  (cdp_t cdp, tcursnum curs, const char * attrname,
  478.   const char * condition, void * result);
  479.  
  480.   // ODBC:
  481. DllKernel BOOL  WINAPI cd_ODBC_open_cursor      (cdp_t cdp, uns32 connection, tcursnum * curs, const char * query);
  482. DllKernel uns32 WINAPI cd_ODBC_find_connection  (cdp_t cdp, const char * dsn_name);
  483. DllKernel uns32 WINAPI cd_ODBC_create_connection(cdp_t cdp, const char * dsn_name);
  484. DllKernel uns32 WINAPI cd_ODBC_direct_connection(cdp_t cdp, const char * conn_string);
  485.  
  486.   // informace o atributech:
  487. typedef BOOL (WINAPI enum_attr)(char * attrname, uns8 attrtype,
  488.                                      uns8 attrmult, uns16 attrspecif);
  489. DllKernel BOOL WINAPI cd_Enum_attributes(cdp_t cdp, ttablenum table, enum_attr * callback);
  490. DllKernel BOOL WINAPI cd_Attribute_info(cdp_t cdp, ttablenum table, const char * attrname,
  491.        tattrib * attrnum, uns8 * attrtype, uns8 * attrmult, uns16 * attrspecif);
  492.  
  493.   // podpisy a replikace:
  494. DllKernel BOOL WINAPI cd_Signature(cdp_t cdp, window_id hParent, tcursnum cursor, trecnum recnum, tattrib attr, BOOL create, void * param);
  495. DllKernel BOOL WINAPI cd_Repl_control(cdp_t cdp, int optype, int opparsize, void * opparam);
  496. DllKernel BOOL WINAPI cd_Replicate(cdp_t cdp, const char * ServerName, const char * ApplName, BOOL pull);
  497. DllKernel BOOL WINAPI cd_Reset_replication(cdp_t cdp);
  498. DllKernel BOOL WINAPI cd_GetSet_next_user(cdp_t cdp, tcurstab curs,
  499.   trecnum position, tattrib attr, t_oper operation, t_valtype valtype, void * value);
  500.  
  501. #ifdef __cplusplus
  502.  } /* of extern "C" */
  503. #endif
  504.  
  505. #endif  /* !def __WBKERNEL_H__ */
  506.  
  507.