Btrieve 2
Loading...
Searching...
No Matches
btrieveCpp.h
Go to the documentation of this file.
1
2//
3// Copyright (C) 2016 - Actian Corp.
4//
6
7// This file exists in both project "zen.core" and "zen.docs".
8// Make sure that both files are kept in sync.
9//
10// When updating this file make the corresponding changes to "btrieveC.h".
11
12#ifndef _BTRIEVECPP_H
13#define _BTRIEVECPP_H
14
15#include <cstddef>
16#include <deque>
17
18#include "btrieveC.h"
19
20class BRestful;
27class BtrieveClient;
30class BtrieveFile;
33class BtrieveFilter;
36class BtrieveVersion;
37
39class LINKAGE Btrieve
40{
41public:
43 static const int MAXIMUM_RECORD_LENGTH = BTRIEVE_MAXIMUM_RECORD_LENGTH;
44
46 static const int MAXIMUM_KEY_LENGTH = BTRIEVE_MAXIMUM_KEY_LENGTH;
47
49 static const int MAXIMUM_BULK_RECORD_COUNT = BTRIEVE_MAXIMUM_BULK_RECORD_COUNT;
50
53 enum ACSMode {
55 ACS_MODE_NONE = 0,
57 ACS_MODE_NAMED = 1,
59 ACS_MODE_NUMBERED = 2,
61 ACS_MODE_CASE_INSENSITIVE = 3,
63 ACS_MODE_DEFAULT = 4,
65 ACS_MODE_UNKNOWN = -7
66 };
67
72 CREATE_MODE_OVERWRITE = 0,
74 CREATE_MODE_NO_OVERWRITE = 1,
76 CREATE_MODE_UNKNOWN = -7
77 };
78
83 COMPARISON_NONE = 0,
85 COMPARISON_EQUAL = 1,
87 COMPARISON_GREATER_THAN = 2,
89 COMPARISON_LESS_THAN = 3,
91 COMPARISON_NOT_EQUAL = 4,
93 COMPARISON_GREATER_THAN_OR_EQUAL = 5,
95 COMPARISON_LESS_THAN_OR_EQUAL = 6,
97 COMPARISON_LIKE = 7,
99 COMPARISON_NOT_LIKE = 8,
101 COMPARISON_JSON_QUERY_MATCH = 9,
103 COMPARISON_UNKNOWN = -7
104 };
105
110 CONNECTOR_LAST = 0,
112 CONNECTOR_AND = 1,
114 CONNECTOR_OR = 2,
116 CONNECTOR_UNKNOWN = -7
117 };
118
119
123 DISK_DRIVE_A = 0,
125 DISK_DRIVE_B = 1,
127 DISK_DRIVE_C = 2,
129 DISK_DRIVE_D = 3,
131 DISK_DRIVE_E = 4,
133 DISK_DRIVE_F = 5,
135 DISK_DRIVE_G = 6,
137 DISK_DRIVE_H = 7,
139 DISK_DRIVE_I = 8,
141 DISK_DRIVE_J = 9,
143 DISK_DRIVE_K = 10,
145 DISK_DRIVE_L = 11,
147 DISK_DRIVE_M = 12,
149 DISK_DRIVE_N = 13,
151 DISK_DRIVE_O = 14,
153 DISK_DRIVE_P = 15,
155 DISK_DRIVE_Q = 16,
157 DISK_DRIVE_R = 17,
159 DISK_DRIVE_S = 18,
161 DISK_DRIVE_T = 19,
163 DISK_DRIVE_U = 20,
165 DISK_DRIVE_V = 21,
167 DISK_DRIVE_W = 22,
169 DISK_DRIVE_X = 23,
171 DISK_DRIVE_Y = 24,
173 DISK_DRIVE_Z = 25,
175 DISK_DRIVE_DEFAULT = 26,
177 DISK_DRIVE_UNKNOWN = -7
178 };
179
185 DUPLICATE_MODE_NOT_ALLOWED = 0,
187 DUPLICATE_MODE_ALLOWED_NONREPEATING = 1,
189 DUPLICATE_MODE_ALLOWED_REPEATING = 2,
191 DUPLICATE_MODE_UNKNOWN = -7
192 };
193
197 enum DataType {
199 DATA_TYPE_CHAR = 0,
201 DATA_TYPE_ZSTRING = 1,
203 DATA_TYPE_INTEGER = 2,
205 DATA_TYPE_UNSIGNED_BINARY = 3,
207 DATA_TYPE_FLOAT = 4,
209 DATA_TYPE_AUTOINCREMENT = 5,
211 DATA_TYPE_DATE = 6,
213 DATA_TYPE_NUMERICSTS = 7,
215 DATA_TYPE_TIME = 8,
217 DATA_TYPE_NUMERICSA = 9,
219 DATA_TYPE_DECIMAL = 10,
221 DATA_TYPE_CURRENCY = 11,
223 DATA_TYPE_MONEY = 12,
225 DATA_TYPE_TIMESTAMP = 13,
227 DATA_TYPE_LOGICAL = 14,
229 DATA_TYPE_WSTRING = 15,
231 DATA_TYPE_NUMERIC = 16,
233 DATA_TYPE_WZSTRING = 17,
235 DATA_TYPE_BFLOAT = 18,
237 DATA_TYPE_GUID = 19,
239 DATA_TYPE_LSTRING = 20,
241 DATA_TYPE_NULL_INDICATOR_SEGMENT = 21,
243 DATA_TYPE_LEGACY_STRING = 22,
245 DATA_TYPE_LEGACY_BINARY = 23,
247 DATA_TYPE_AUTOTIMESTAMP = 24,
249 DATA_TYPE_CLOB = 25,
251 DATA_TYPE_TIMESTAMP2 = 26,
253 DATA_TYPE_BIT = 27,
255 DATA_TYPE_NUMERICSLB = 28,
257 DATA_TYPE_NUMERICSLS = 29,
259 DATA_TYPE_NUMERICSTB = 30,
261 DATA_TYPE_UNKNOWN = -7
262 };
263
269 FILE_VERSION_6_0 = 0,
271 FILE_VERSION_6_1 = 1,
273 FILE_VERSION_7_0 = 2,
275 FILE_VERSION_8_0 = 3,
277 FILE_VERSION_9_0 = 4,
279 FILE_VERSION_9_5 = 5,
281 FILE_VERSION_13_0 = 7,
283 FILE_VERSION_16_0 = 8,
285 FILE_VERSION_DEFAULT = 6,
287 FILE_VERSION_UNKNOWN = -7
288 };
289
295 FREE_SPACE_THRESHOLD_10_PERCENT = 0,
297 FREE_SPACE_THRESHOLD_20_PERCENT = 1,
299 FREE_SPACE_THRESHOLD_30_PERCENT = 2,
301 FREE_SPACE_THRESHOLD_DEFAULT = 3,
303 FREE_SPACE_THRESHOLD_UNKNOWN = -7
304 };
305
309 enum Index {
311 INDEX_1 = 0,
313 INDEX_2 = 1,
315 INDEX_3 = 2,
317 INDEX_4 = 3,
319 INDEX_5 = 4,
321 INDEX_6 = 5,
323 INDEX_7 = 6,
325 INDEX_8 = 7,
327 INDEX_9 = 8,
329 INDEX_10 = 9,
331 INDEX_11 = 10,
333 INDEX_12 = 11,
335 INDEX_13 = 12,
337 INDEX_14 = 13,
339 INDEX_15 = 14,
341 INDEX_16 = 15,
343 INDEX_17 = 16,
345 INDEX_18 = 17,
347 INDEX_19 = 18,
349 INDEX_20 = 19,
351 INDEX_21 = 20,
353 INDEX_22 = 21,
355 INDEX_23 = 22,
357 INDEX_24 = 23,
359 INDEX_25 = 24,
361 INDEX_26 = 25,
363 INDEX_27 = 26,
365 INDEX_28 = 27,
367 INDEX_29 = 28,
369 INDEX_30 = 29,
371 INDEX_31 = 30,
373 INDEX_32 = 31,
375 INDEX_33 = 32,
377 INDEX_34 = 33,
379 INDEX_35 = 34,
381 INDEX_36 = 35,
383 INDEX_37 = 36,
385 INDEX_38 = 37,
387 INDEX_39 = 38,
389 INDEX_40 = 39,
391 INDEX_41 = 40,
393 INDEX_42 = 41,
395 INDEX_43 = 42,
397 INDEX_44 = 43,
399 INDEX_45 = 44,
401 INDEX_46 = 45,
403 INDEX_47 = 46,
405 INDEX_48 = 47,
407 INDEX_49 = 48,
409 INDEX_50 = 49,
411 INDEX_51 = 50,
413 INDEX_52 = 51,
415 INDEX_53 = 52,
417 INDEX_54 = 53,
419 INDEX_55 = 54,
421 INDEX_56 = 55,
423 INDEX_57 = 56,
425 INDEX_58 = 57,
427 INDEX_59 = 58,
429 INDEX_60 = 59,
431 INDEX_61 = 60,
433 INDEX_62 = 61,
435 INDEX_63 = 62,
437 INDEX_64 = 63,
439 INDEX_65 = 64,
441 INDEX_66 = 65,
443 INDEX_67 = 66,
445 INDEX_68 = 67,
447 INDEX_69 = 68,
449 INDEX_70 = 69,
451 INDEX_71 = 70,
453 INDEX_72 = 71,
455 INDEX_73 = 72,
457 INDEX_74 = 73,
459 INDEX_75 = 74,
461 INDEX_76 = 75,
463 INDEX_77 = 76,
465 INDEX_78 = 77,
467 INDEX_79 = 78,
469 INDEX_80 = 79,
471 INDEX_81 = 80,
473 INDEX_82 = 81,
475 INDEX_83 = 82,
477 INDEX_84 = 83,
479 INDEX_85 = 84,
481 INDEX_86 = 85,
483 INDEX_87 = 86,
485 INDEX_88 = 87,
487 INDEX_89 = 88,
489 INDEX_90 = 89,
491 INDEX_91 = 90,
493 INDEX_92 = 91,
495 INDEX_93 = 92,
497 INDEX_94 = 93,
499 INDEX_95 = 94,
501 INDEX_96 = 95,
503 INDEX_97 = 96,
505 INDEX_98 = 97,
507 INDEX_99 = 98,
509 INDEX_100 = 99,
511 INDEX_101 = 100,
513 INDEX_102 = 101,
515 INDEX_103 = 102,
517 INDEX_104 = 103,
519 INDEX_105 = 104,
521 INDEX_106 = 105,
523 INDEX_107 = 106,
525 INDEX_108 = 107,
527 INDEX_109 = 108,
529 INDEX_110 = 109,
531 INDEX_111 = 110,
533 INDEX_112 = 111,
535 INDEX_113 = 112,
537 INDEX_114 = 113,
539 INDEX_115 = 114,
541 INDEX_116 = 115,
543 INDEX_117 = 116,
545 INDEX_118 = 117,
547 INDEX_119 = 118,
549 INDEX_SYSTEM_VERSION_2 = 124,
551 INDEX_SYSTEM = 125,
553 INDEX_NONE = -1,
555 INDEX_UNKNOWN = -7
556 };
557
561 LOCATION_MODE_NO_PREFERENCE = 0,
563 LOCATION_MODE_FORCE_LOCAL = 1,
565 LOCATION_MODE_FORCE_REMOTE = 2,
567 LOCATION_MODE_UNKNOWN = -7
568 };
569
573 enum LockMode {
575 LOCK_MODE_NONE = 0,
577 LOCK_MODE_SINGLE_WAIT = 1,
579 LOCK_MODE_SINGLE_NO_WAIT = 2,
581 LOCK_MODE_MULTIPLE_WAIT = 3,
583 LOCK_MODE_MULTIPLE_NO_WAIT = 4,
585 LOCK_MODE_UNKNOWN = -7
586 };
587
593 NULL_KEY_MODE_ALL_SEGMENTS = 0,
595 NULL_KEY_MODE_ANY_SEGMENTS = 1,
597 NULL_KEY_MODE_NONE = 2,
599 NULL_KEY_MODE_UNKNOWN = -7
600 };
601
604 enum OpenMode {
606 OPEN_MODE_NORMAL = 0,
608 OPEN_MODE_ACCELERATED = 1,
610 OPEN_MODE_READ_ONLY = 2,
612 OPEN_MODE_EXCLUSIVE = 3,
614 OPEN_MODE_WRITABLE = 4,
616 OPEN_MODE_UNKNOWN = -7
617 };
618
623 OWNER_MODE_NONE = 0,
625 OWNER_MODE_NO_ENCRYPTION_NO_READ_ALLOWED = 1,
627 OWNER_MODE_NO_ENCRYPTION_READ_ALLOWED = 2,
629 OWNER_MODE_ENCRYPTION_NO_READ_ALLOWED = 3,
631 OWNER_MODE_ENCRYPTION_READ_ALLOWED = 4,
633 OWNER_MODE_UNKNOWN = -7
634 };
635
640 ENCRYPT_TYPE_NONE = 0,
642 ENCRYPT_TYPE_TRADITIONAL = 1,
644 ENCRYPT_TYPE_128_BIT = 2,
646 ENCRYPT_TYPE_AES_192 = 3,
648 ENCRYPT_TYPE_AES_256 = 4,
650 ENCRYPT_TYPE_UNKNOWN = -7
651 };
652
657 PAGE_LOCK_TYPE_NONE = 0,
659 PAGE_LOCK_TYPE_DATA_PAGE = 1,
661 PAGE_LOCK_TYPE_INDEX_PAGE = 2,
663 PAGE_LOCK_TYPE_VARIABLE_PAGE = 3,
665 PAGE_LOCK_TYPE_UNKNOWN = -7
666 };
667
671 enum PageSize {
673 PAGE_SIZE_512 = 0,
675 PAGE_SIZE_1024 = 1,
677 PAGE_SIZE_1536 = 2,
679 PAGE_SIZE_2048 = 3,
681 PAGE_SIZE_3072 = 4,
683 PAGE_SIZE_3584 = 5,
685 PAGE_SIZE_4096 = 6,
687 PAGE_SIZE_8192 = 7,
689 PAGE_SIZE_16384 = 8,
691 PAGE_SIZE_DEFAULT = 9,
693 PAGE_SIZE_UNKNOWN = -7
694 };
695
701 RECORD_COMPRESSION_MODE_NONE = 0,
703 RECORD_COMPRESSION_MODE_BLANK_TRUNCATION = 1,
705 RECORD_COMPRESSION_MODE_RUN_LENGTH_ENCODING = 2,
707 RECORD_COMPRESSION_MODE_UNKNOWN = -7
708 };
709
715 STATUS_CODE_NO_ERROR = 0,
717 STATUS_CODE_INVALID_FUNCTION = 1,
719 STATUS_CODE_IO_ERROR = 2,
721 STATUS_CODE_FILE_NOT_OPEN = 3,
723 STATUS_CODE_KEY_VALUE_NOT_FOUND = 4,
725 STATUS_CODE_DUPLICATE_KEY_VALUE = 5,
727 STATUS_CODE_INVALID_INDEX_NUMBER = 6,
729 STATUS_CODE_DIFFERENT_INDEX_NUMBER = 7,
731 STATUS_CODE_POSITION_NOT_SET = 8,
733 STATUS_CODE_END_OF_FILE = 9,
735 STATUS_CODE_MODIFIABLE_KEYVALUE_ERROR = 10,
737 STATUS_CODE_FILENAME_BAD = 11,
739 STATUS_CODE_FILE_NOT_FOUND = 12,
741 STATUS_CODE_EXTENDED_FILE_ERROR = 13,
743 STATUS_CODE_PREIMAGE_OPEN_ERROR = 14,
745 STATUS_CODE_PREIMAGE_IO_ERROR = 15,
747 STATUS_CODE_EXPANSION_ERROR = 16,
749 STATUS_CODE_CLOSE_ERROR = 17,
751 STATUS_CODE_DISKFULL = 18,
753 STATUS_CODE_UNRECOVERABLE_ERROR = 19,
755 STATUS_CODE_RECORD_MANAGER_INACTIVE = 20,
757 STATUS_CODE_KEYBUFFER_TOO_SHORT = 21,
759 STATUS_CODE_DATALENGTH_ERROR = 22,
761 STATUS_CODE_POSITIONBLOCK_LENGTH = 23,
763 STATUS_CODE_PAGE_SIZE_ERROR = 24,
765 STATUS_CODE_CREATE_IO_ERROR = 25,
767 STATUS_CODE_NUMBER_OF_INDEXES = 26,
769 STATUS_CODE_INVALID_KEY_POSITION = 27,
771 STATUS_CODE_INVALID_RECORD_LENGTH = 28,
773 STATUS_CODE_INVALID_KEYLENGTH = 29,
775 STATUS_CODE_NOT_A_BTRIEVE_FILE = 30,
777 STATUS_CODE_FILE_ALREADY_EXTENDED = 31,
779 STATUS_CODE_EXTEND_IO_ERROR = 32,
781 STATUS_CODE_BTR_CANNOT_UNLOAD = 33,
783 STATUS_CODE_INVALID_EXTENSION_NAME = 34,
785 STATUS_CODE_DIRECTORY_ERROR = 35,
787 STATUS_CODE_TRANSACTION_ERROR = 36,
789 STATUS_CODE_TRANSACTION_IS_ACTIVE = 37,
791 STATUS_CODE_TRANSACTION_FILE_IO_ERROR = 38,
793 STATUS_CODE_END_TRANSACTION_ERROR = 39,
795 STATUS_CODE_TRANSACTION_MAX_FILES = 40,
797 STATUS_CODE_OPERATION_NOT_ALLOWED = 41,
799 STATUS_CODE_INCOMPLETE_ACCEL_ACCESS = 42,
801 STATUS_CODE_INVALID_RECORD_ADDRESS = 43,
803 STATUS_CODE_NULL_KEYPATH = 44,
805 STATUS_CODE_INCONSISTENT_KEY_FLAGS = 45,
807 STATUS_CODE_ACCESS_TO_FILE_DENIED = 46,
809 STATUS_CODE_MAXIMUM_OPEN_FILES = 47,
811 STATUS_CODE_INVALID_ALT_SEQUENCE_DEF = 48,
813 STATUS_CODE_KEY_TYPE_ERROR = 49,
815 STATUS_CODE_OWNER_ALREADY_SET = 50,
817 STATUS_CODE_INVALID_OWNER = 51,
819 STATUS_CODE_ERROR_WRITING_CACHE = 52,
821 STATUS_CODE_INVALID_INTERFACE = 53,
823 STATUS_CODE_VARIABLE_PAGE_ERROR = 54,
825 STATUS_CODE_AUTOINCREMENT_ERROR = 55,
827 STATUS_CODE_INCOMPLETE_INDEX = 56,
829 STATUS_CODE_EXPANED_MEM_ERROR = 57,
831 STATUS_CODE_COMPRESS_BUFFER_TOO_SHORT = 58,
833 STATUS_CODE_FILE_ALREADY_EXISTS = 59,
835 STATUS_CODE_REJECT_COUNT_REACHED = 60,
837 STATUS_CODE_SMALL_EX_GET_BUFFER_ERROR = 61,
839 STATUS_CODE_INVALID_GET_EXPRESSION = 62,
841 STATUS_CODE_INVALID_EXT_INSERT_BUFF = 63,
843 STATUS_CODE_OPTIMIZE_LIMIT_REACHED = 64,
845 STATUS_CODE_INVALID_EXTRACTOR = 65,
847 STATUS_CODE_RI_TOO_MANY_DATABASES = 66,
849 STATUS_CODE_RIDDF_CANNOT_OPEN = 67,
851 STATUS_CODE_RI_CASCADE_TOO_DEEP = 68,
853 STATUS_CODE_RI_CASCADE_ERROR = 69,
855 STATUS_CODE_RI_VIOLATION = 71,
857 STATUS_CODE_RI_REFERENCED_FILE_CANNOT_OPEN = 72,
859 STATUS_CODE_RI_OUT_OF_SYNC = 73,
861 STATUS_CODE_END_CHANGED_TO_ABORT = 74,
863 STATUS_CODE_RI_CONFLICT = 76,
865 STATUS_CODE_CANT_LOOP_IN_SERVER = 77,
867 STATUS_CODE_DEAD_LOCK = 78,
869 STATUS_CODE_PROGRAMMING_ERROR = 79,
871 STATUS_CODE_CONFLICT = 80,
873 STATUS_CODE_LOCKERROR = 81,
875 STATUS_CODE_LOST_POSITION = 82,
877 STATUS_CODE_READ_OUTSIDE_TRANSACTION = 83,
879 STATUS_CODE_RECORD_INUSE = 84,
881 STATUS_CODE_FILE_INUSE = 85,
883 STATUS_CODE_FILE_TABLE_FULL = 86,
885 STATUS_CODE_NOHANDLES_AVAILABLE = 87,
887 STATUS_CODE_INCOMPATIBLE_MODE_ERROR = 88,
889 STATUS_CODE_DEVICE_TABLE_FULL = 90,
891 STATUS_CODE_SERVER_ERROR = 91,
893 STATUS_CODE_TRANSACTION_TABLE_FULL = 92,
895 STATUS_CODE_INCOMPATIBLE_LOCK_TYPE = 93,
897 STATUS_CODE_PERMISSION_ERROR = 94,
899 STATUS_CODE_SESSION_NO_LONGER_VALID = 95,
901 STATUS_CODE_COMMUNICATIONS_ERROR = 96,
903 STATUS_CODE_DATA_MESSAGE_TOO_SMALL = 97,
905 STATUS_CODE_INTERNAL_TRANSACTION_ERROR = 98,
907 STATUS_CODE_REQUESTER_CANT_ACCESS_RUNTIME = 99,
909 STATUS_CODE_NO_CACHE_BUFFERS_AVAIL = 100,
911 STATUS_CODE_NO_OS_MEMORY_AVAIL = 101,
913 STATUS_CODE_NO_STACK_AVAIL = 102,
915 STATUS_CODE_CHUNK_OFFSET_TOO_LONG = 103,
917 STATUS_CODE_LOCALE_ERROR = 104,
919 STATUS_CODE_CANNOT_CREATE_WITH_VAT = 105,
921 STATUS_CODE_CHUNK_CANNOT_GET_NEXT = 106,
923 STATUS_CODE_CHUNK_INCOMPATIBLE_FILE = 107,
925 STATUS_CODE_TRANSACTION_TOO_COMPLEX = 109,
927 STATUS_CODE_ARCH_BLOG_OPEN_ERROR = 110,
929 STATUS_CODE_ARCH_FILE_NOT_LOGGED = 111,
931 STATUS_CODE_ARCH_FILE_IN_USE = 112,
933 STATUS_CODE_ARCH_LOGFILE_NOT_FOUND = 113,
935 STATUS_CODE_ARCH_LOGFILE_INVALID = 114,
937 STATUS_CODE_ARCH_DUMPFILE_ACCESS_ERROR = 115,
939 STATUS_CODE_LOCATOR_FILE_INDICATOR = 116,
941 STATUS_CODE_NO_SYSTEM_LOCKS_AVAILABLE = 130,
943 STATUS_CODE_FILE_FULL = 132,
945 STATUS_CODE_MORE_THAN_5_CONCURRENT_USERS = 133,
947 STATUS_CODE_ISR_NOT_FOUND = 134,
949 STATUS_CODE_ISR_INVALID = 135,
951 STATUS_CODE_ACS_NOT_FOUND = 136,
953 STATUS_CODE_CANNOT_CONVERT_RP = 137,
955 STATUS_CODE_INVALID_NULL_INDICATOR = 138,
957 STATUS_CODE_INVALID_KEY_OPTION = 139,
959 STATUS_CODE_INCOMPATIBLE_CLOSE = 140,
961 STATUS_CODE_INVALID_USERNAME = 141,
963 STATUS_CODE_INVALID_DATABASE = 142,
965 STATUS_CODE_NO_SSQL_RIGHTS = 143,
967 STATUS_CODE_ALREADY_LOGGED_IN = 144,
969 STATUS_CODE_NO_DATABASE_SERVICES = 145,
971 STATUS_CODE_DUPLICATE_SYSTEM_KEY = 146,
973 STATUS_CODE_LOG_SEGMENT_MISSING = 147,
975 STATUS_CODE_ROLL_FORWARD_ERROR = 148,
977 STATUS_CODE_SYSTEM_KEY_INTERNAL = 149,
979 STATUS_CODE_DBS_INTERNAL_ERROR = 150,
982 STATUS_CODE_CHUNK_OFFSET_TOO_SMALL = 151,
984 STATUS_CODE_INVALID_PARAMETER_TO_MKDE = 160,
986 STATUS_CODE_USER_COUNT_LIMIT_EXCEEDED = 161,
988 STATUS_CODE_CLIENT_TABLE_FULL = 162,
990 STATUS_CODE_LAST_SEGMENT_ERROR = 163,
992 STATUS_CODE_LOGIN_FAILED_BAD_USERNAME = 170,
994 STATUS_CODE_LOGIN_FAILED_BAD_PASSWORD = 171,
996 STATUS_CODE_LOGIN_FAILED_BAD_DATABASE = 172,
998 STATUS_CODE_LOGIN_ALREADY_LOGGED_IN = 173,
1000 STATUS_CODE_LOGIN_LOGOUT_FAILED = 174,
1002 STATUS_CODE_LOGIN_WRONG_URI_FORMAT = 175,
1004 STATUS_CODE_LOGIN_FILE_AND_TABLE_NOT_FOUND = 176,
1006 STATUS_CODE_LOGIN_TABLE_NOT_IN_DATABASE = 177,
1008 STATUS_CODE_LOGIN_DIRECTORY_NOT_IN_DATABASE = 178,
1010 STATUS_CODE_LOCK_PARM_OUTOFRANGE = 1001,
1012 STATUS_CODE_MEM_ALLOCATION_ERR = 1002,
1014 STATUS_CODE_MEM_PARM_TOO_SMALL = 1003,
1016 STATUS_CODE_PAGE_SIZE_PARM_OUTOFRANGE = 1004,
1018 STATUS_CODE_INVALID_PREIMAGE_PARM = 1005,
1020 STATUS_CODE_PREIMAGE_BUF_PARM_OUTOFRANGE = 1006,
1022 STATUS_CODE_FILES_PARM_OUTOFRANGE = 1007,
1024 STATUS_CODE_INVALID_INIT_PARM = 1008,
1026 STATUS_CODE_INVALID_TRANS_PARM = 1009,
1028 STATUS_CODE_ERROR_ACC_TRANS_CONTROL_FILE = 1010,
1030 STATUS_CODE_COMPRESSION_BUF_PARM_OUTOFRANGE = 1011,
1032 STATUS_CODE_INV_N_OPTION = 1012,
1034 STATUS_CODE_TASK_LIST_FULL = 1013,
1036 STATUS_CODE_STOP_WARNING = 1014,
1038 STATUS_CODE_POINTER_PARM_INVALID = 1015,
1040 STATUS_CODE_ALREADY_INITIALIZED = 1016,
1042 STATUS_CODE_REQ_CANT_FIND_RES_DLL = 1017,
1044 STATUS_CODE_ALREADY_INSIDE_BTR_FUNCTION = 1018,
1046 STATUS_CODE_CALLBACK_ABORT = 1019,
1048 STATUS_CODE_INTF_COMM_ERROR = 1020,
1050 STATUS_CODE_FAILED_TO_INITIALIZE = 1021,
1052 STATUS_CODE_MKDE_SHUTTING_DOWN = 1022,
1054 STATUS_CODE_INTERNAL_ERROR = 2000,
1056 STATUS_CODE_INSUFFICIENT_MEM_ALLOC = 2001,
1058 STATUS_CODE_INVALID_OPTION = 2002,
1060 STATUS_CODE_NO_LOCAL_ACCESS_ALLOWED = 2003,
1062 STATUS_CODE_SPX_NOT_INSTALLED = 2004,
1064 STATUS_CODE_INCORRECT_SPX_VERSION = 2005,
1066 STATUS_CODE_NO_AVAIL_SPX_CONNECTION = 2006,
1068 STATUS_CODE_INVALID_PTR_PARM = 2007,
1070 STATUS_CODE_CANT_CONNECT_TO_615 = 2008,
1072 STATUS_CODE_CANT_LOAD_MKDE_ROUTER = 2009,
1074 STATUS_CODE_UT_THUNK_NOT_LOADED = 2010,
1076 STATUS_CODE_NO_RESOURCE_DLL = 2011,
1078 STATUS_CODE_OS_ERROR = 2012,
1080 STATUS_CODE_MK_ROUTER_MEM_ERROR = 3000,
1082 STATUS_CODE_MK_NO_LOCAL_ACCESS_ALLOWED = 3001,
1084 STATUS_CODE_MK_NO_RESOURCE_DLL = 3002,
1086 STATUS_CODE_MK_INCOMPAT_COMPONENT = 3003,
1088 STATUS_CODE_MK_TIMEOUT_ERROR = 3004,
1090 STATUS_CODE_MK_OS_ERROR = 3005,
1092 STATUS_CODE_MK_INVALID_SESSION = 3006,
1094 STATUS_CODE_MK_SERVER_NOT_FOUND = 3007,
1096 STATUS_CODE_MK_INVALID_CONFIG = 3008,
1098 STATUS_CODE_MK_NETAPI_NOT_LOADED = 3009,
1100 STATUS_CODE_MK_NWAPI_NOT_LOADED = 3010,
1102 STATUS_CODE_MK_THUNK_NOT_LOADED = 3011,
1104 STATUS_CODE_MK_LOCAL_NOT_LOADED = 3012,
1106 STATUS_CODE_MK_PNSL_NOT_LOADED = 3013,
1108 STATUS_CODE_MK_CANT_FIND_ENGINE = 3014,
1110 STATUS_CODE_MK_INIT_ERROR = 3015,
1112 STATUS_CODE_MK_INTERNAL_ERROR = 3016,
1114 STATUS_CODE_MK_LOCAL_MKDE_DATABUF_TOO_SMALL = 3017,
1116 STATUS_CODE_MK_CLOSED_ERROR = 3018,
1118 STATUS_CODE_MK_SEMAPHORE_ERROR = 3019,
1120 STATUS_CODE_MK_LOADING_ERROR = 3020,
1122 STATUS_CODE_MK_BAD_SRB_FORMAT = 3021,
1124 STATUS_CODE_MK_DATABUF_LEN_TOO_LARGE = 3022,
1126 STATUS_CODE_MK_TASK_TABLE_FULL = 3023,
1128 STATUS_CODE_MK_INVALID_OP_ON_REMOTE = 3024,
1130 STATUS_CODE_MK_PIDS_NOT_LOADED = 3025,
1132 STATUS_CODE_MK_BAD_PIDS = 3026,
1134 STATUS_CODE_MK_IDS_CONNECT_FAILURE = 3027,
1136 STATUS_CODE_MK_IDS_LOGIN_FAILURE = 3028,
1138 STATUS_CODE_NL_FAILURE = 3101,
1140 STATUS_CODE_NL_NOT_INITIALIZED = 3102,
1142 STATUS_CODE_NL_NAME_NOT_FOUND = 3103,
1144 STATUS_CODE_NL_PERMISSION_ERROR = 3104,
1146 STATUS_CODE_NL_NO_AVAILABLE_TRANSPORT = 3105,
1148 STATUS_CODE_NL_CONNECTION_FAILURE = 3106,
1150 STATUS_CODE_NL_OUT_OF_MEMORY = 3107,
1152 STATUS_CODE_NL_INVALID_SESSION = 3108,
1154 STATUS_CODE_NL_MORE_DATA = 3109,
1156 STATUS_CODE_NL_NOT_CONNECTED = 3110,
1158 STATUS_CODE_NL_SEND_FAILURE = 3111,
1160 STATUS_CODE_NL_RECEIVE_FAILURE = 3112,
1162 STATUS_CODE_NL_INVALID_SERVER_TYPE = 3113,
1164 STATUS_CODE_NL_SRT_FULL = 3114,
1166 STATUS_CODE_NL_TRANSPORT_FAILURE = 3115,
1168 STATUS_CODE_NL_RCV_DATA_OVERFLOW = 3116,
1170 STATUS_CODE_NL_CST_FULL = 3117,
1172 STATUS_CODE_NL_INVALID_ADDRESS_FAMILY = 3118,
1174 STATUS_CODE_NL_NO_AUTH_CONTEXT_AVAILABLE = 3119,
1176 STATUS_CODE_NL_INVALID_AUTH_TYPE = 3120,
1178 STATUS_CODE_NL_INVALID_AUTH_OBJECT = 3121,
1180 STATUS_CODE_NL_AUTH_LEN_TOO_SMALL = 3122,
1182 STATUS_CODE_NL_INVALID_SESSION_LEVEL_PARM = 3123,
1184 STATUS_CODE_NL_TASK_TABLE_FULL = 3124,
1186 STATUS_CODE_NL_NDS_NAME_RESOLUTION_ERROR = 3125,
1188 STATUS_CODE_NL_FILE_NAME_RESOLUTION_ERROR = 3126,
1190 STATUS_CODE_NL_IDS_SEND_FAILURE = 3127,
1192 STATUS_CODE_NL_IDS_RCV_FAILURE = 3128,
1194 STATUS_CODE_UNKNOWN = -7,
1195 };
1196
1202 SYSTEM_DATA_MODE_YES = 0,
1204 SYSTEM_DATA_MODE_NO = 1,
1206 SYSTEM_DATA_MODE_DEFAULT = 2,
1208 SYSTEM_DATA_MODE_VERSION_2 = 3,
1210 SYSTEM_DATA_MODE_UNKNOWN = -7
1212
1216 TRANSACTION_MODE_EXCLUSIVE = 0,
1218 TRANSACTION_MODE_CONCURRENT_WRITE_WAIT = 1,
1220 TRANSACTION_MODE_CONCURRENT_NO_WRITE_WAIT = 2,
1222 TRANSACTION_MODE_UNKNOWN = -7
1224
1229 UNLOCK_MODE_SINGLE = 0,
1231 UNLOCK_MODE_MULTIPLE = 1,
1233 UNLOCK_MODE_UNKNOWN = -7
1235
1241 VARIABLE_LENGTH_RECORDS_MODE_NO = 0,
1243 VARIABLE_LENGTH_RECORDS_MODE_YES = 1,
1245 VARIABLE_LENGTH_RECORDS_MODE_YES_VARIABLE_ALLOCATION_TAILS = 2,
1247 VARIABLE_LENGTH_RECORDS_MODE_UNKNOWN = -7
1249
1254 VERSION_TYPE_NONE = 0,
1256 VERSION_TYPE_BTRIEVE_ENGINE = 1,
1258 VERSION_TYPE_WORKGROUP_ENGINE = 2,
1260 VERSION_TYPE_DOS_WORKSTATION = 3,
1262 VERSION_TYPE_CLIENT_REQUESTOR = 4,
1264 VERSION_TYPE_WINDOWS_SERVER_ENGINE = 5,
1266 VERSION_TYPE_UNIX = 6,
1268 VERSION_TYPE_CLIENT_ENGINE = 7,
1270 VERSION_TYPE_UNKNOWN = -7
1272
1277 SYSTEM_FIELD_CREATE_TIME = 0,
1279 SYSTEM_FIELD_UPDATE_TIME = 1,
1281 SYSTEM_FIELD_UNKNOWN = -7
1283
1288 static const char *ACSModeToString(ACSMode ACSMode);
1293 static const char *DuplicateModeToString(DuplicateMode duplicateMode);
1298 static const char *DataTypeToString(DataType dataType);
1303 static const char *FileVersionToString(FileVersion fileVersion);
1308 static const char *FreeSpaceThresholdToString(FreeSpaceThreshold freeSpaceThreshold);
1313 static const char *IndexToString(Index index);
1318 static const char *NullKeyModeToString(NullKeyMode nullKeyMode);
1323 static const char *PageSizeToString(PageSize pageSize);
1328 static const char *RecordCompressionModeToString(RecordCompressionMode recordCompressionMode);
1333 static const char *StatusCodeToString(StatusCode statusCode);
1338 static const char *SystemDataModeToString(SystemDataMode systemDataMode);
1343 static const char *VersionTypeToString(VersionType versionType);
1348 static const char *PageLockTypeToString(PageLockType pageLockType);
1353 static const char *LockModeToString(LockMode lockMode);
1358 static const char *OwnerModeToString(OwnerMode ownerMode);
1362 static const char *EncryptTypeToString(EncryptType encryptType);
1367 static const char *VariableLengthRecordsModeToString(VariableLengthRecordsMode variableLengthRecordsMode);
1371 static const char *SystemFieldToString(SystemField systemField);
1375 static long long UnixEpochMicrosecondsToTimestamp(long long microseconds);
1379 static long long TimestampToUnixEpochMicroseconds(long long timestamp);
1380
1381private:
1382 Btrieve();
1383 ~Btrieve();
1384};
1385
1387class LINKAGE BtrieveClient
1388{
1389public:
1396 BtrieveClient(int serviceAgentIdentifier, int clientIdentifier);
1398
1406 Btrieve::StatusCode GetVersion(BtrieveVersion *btrieveVersion, BtrieveFile *btrieveFile = NULL);
1417 Btrieve::StatusCode FileOpen(BtrieveFile *btrieveFile, const char *fileName, const char *ownerName, Btrieve::OpenMode openMode, Btrieve::LocationMode locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE);
1427 Btrieve::StatusCode FileOpen(BtrieveFile *btrieveFile, const wchar_t *fileName, const char *ownerName, Btrieve::OpenMode openMode, Btrieve::LocationMode locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE);
1428
1429// Avoid Windows renaming of GetCurrentDirectory.
1430#ifdef GetCurrentDirectory
1431 #undef GetCurrentDirectory
1432#endif
1433
1441#ifndef SWIG
1450 Btrieve::StatusCode GetCurrentDirectory(Btrieve::DiskDrive diskDrive, char *currentDirectory, int currentDirectorySize);
1451#endif
1459 Btrieve::StatusCode GetCurrentDirectory(Btrieve::DiskDrive diskDrive, wchar_t *currentDirectory, int currentDirectorySize);
1511 Btrieve::StatusCode FileCreate(BtrieveFileAttributes *btrieveFileAttributes, BtrieveIndexAttributes *btrieveIndexAttributes, const char *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE);
1521 Btrieve::StatusCode FileCreate(BtrieveFileInformation *btrieveFileInformation, const char *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE);
1543 Btrieve::StatusCode FileCreate(BtrieveFileAttributes *btrieveFileAttributes, BtrieveIndexAttributes *btrieveIndexAttributes, const wchar_t *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE);
1553 Btrieve::StatusCode FileCreate(BtrieveFileInformation *btrieveFileInformation, const wchar_t *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE);
1561 Btrieve::StatusCode FileDelete(const char *fileName);
1568 Btrieve::StatusCode FileDelete(const wchar_t *fileName);
1575 Btrieve::StatusCode FileRename(const char *existingFileName, const char *newFileName);
1582 Btrieve::StatusCode FileRename(const wchar_t *existingFileName, const wchar_t *newFileName);
1595 Btrieve::StatusCode Login(const char *databaseURI);
1601 Btrieve::StatusCode Login(const wchar_t *databaseURI);
1608 Btrieve::StatusCode Logout(const char *databaseURI);
1614 Btrieve::StatusCode Logout(const wchar_t *databaseURI);
1620
1621// Avoid Windows renaming of SetCurrentDirectory.
1622#ifdef SetCurrentDirectory
1623 #undef SetCurrentDirectory
1624#endif
1625
1633 Btrieve::StatusCode SetCurrentDirectory(const char *currentDirectory);
1641 Btrieve::StatusCode SetCurrentDirectory(const wchar_t *currentDirectory);
1680 Btrieve::StatusCode CollectionCreate(const char *collectionName);
1687 Btrieve::StatusCode CollectionDelete(const char *collectionName);
1694 Btrieve::StatusCode CollectionRename(const char *existingCollectionName, const char *newCollectionName);
1703 Btrieve::StatusCode CollectionOpen(BtrieveCollection *btrieveCollection, const char *collectionName, const char *password = NULL);
1711
1712private:
1713 btrieve_client_t btrieveClient = NULL;
1714};
1715
1728class LINKAGE BtrieveFile
1729{
1730 friend class BtrieveClient;
1731
1732protected:
1733 btrieve_file_t GetBtrieveFile();
1734 btrieve_file_t *GetBtrieveFilePtr();
1735 BtrieveFile(btrieve_file_t btrieveFileIn);
1736
1737public:
1743
1770 int RecordRetrieveByFraction(Btrieve::Index index, int numerator, int denominator, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
1788 int RecordRetrieveByFraction(Btrieve::Index index, int numerator, int denominator, char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
1804 int RecordRetrieveByPercentage(Btrieve::Index index, int percentage, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
1821 int RecordRetrieveByPercentage(Btrieve::Index index, int percentage, char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
1838 int RecordRetrieveByCursorPosition(Btrieve::Index index, long long cursorPosition, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
1855 int RecordRetrieveByCursorPosition(Btrieve::Index index, long long cursorPosition, char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
1874 int RecordRetrieve(Btrieve::Comparison comparison, Btrieve::Index index, char *key, int keyLength, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
1889 Btrieve::StatusCode KeyRetrieve(Btrieve::Comparison comparison, Btrieve::Index index, char *key, int keyLength);
1966 int RecordRetrieveFirst(Btrieve::Index index, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
1982 int RecordRetrieveFirst(Btrieve::Index index, char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
2007 int GetNumerator(long long cursorPosition, int denominator);
2021 int GetNumerator(Btrieve::Index index, const char *key, int keyLength, int denominator);
2036 int RecordRetrieveLast(Btrieve::Index index, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
2052 int RecordRetrieveLast(Btrieve::Index index, char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
2086 Btrieve::StatusCode KeyRetrieveNext(char *key, int keySize);
2100 int RecordRetrieveNext(char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
2115 int RecordRetrieveNext(char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
2127 int GetPercentage(long long cursorPosition);
2140 int GetPercentage(Btrieve::Index index, const char *key, int keyLength);
2197 int RecordRetrievePrevious(char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
2212 int RecordRetrievePrevious(char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
2228 int RecordRetrieveChunk(int offset, int length, char *chunk, int chunkSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
2243 int RecordRetrieveChunk(int length, char *chunk, int chunkSize, Btrieve::LockMode lockMode = Btrieve::LOCK_MODE_NONE);
2277 Btrieve::StatusCode RecordCreate(char *record, int recordLength);
2289 Btrieve::StatusCode BulkCreate(BtrieveBulkCreatePayload *btrieveBulkCreatePayload, BtrieveBulkCreateResult *btrieveBulkCreateResult);
2304 Btrieve::StatusCode SetOwner(Btrieve::OwnerMode ownerMode, const char *ownerName = NULL, const char *ownerNameAgain = NULL, bool useLongOwnerName = true);
2355 Btrieve::StatusCode RecordUpdate(const char *record, int recordLength);
2369 Btrieve::StatusCode RecordAppendChunk(const char *chunk, int chunkLength);
2381 Btrieve::StatusCode RecordDeleteChunk(int offset, int chunkLength);
2405 Btrieve::StatusCode RecordInsertChunk(int offset, const char *chunk, int chunkLength);
2417 Btrieve::StatusCode RecordInsertChunk(const char *chunk, int chunkLength);
2429 Btrieve::StatusCode RecordUpdateChunk(int offset, const char *chunk, int chunkLength);
2440 Btrieve::StatusCode RecordUpdateChunk(const char *chunk, int chunkLength);
2441
2442private:
2443 btrieve_file_t btrieveFile = NULL;
2444};
2445
2573
2576{
2577 friend class BtrieveClient;
2578 friend class BtrieveFile;
2579
2580protected:
2581 btrieve_file_information_t GetBtrieveFileInformation();
2582
2583public:
2588
2631 Btrieve::StatusCode GetKeySegment(BtrieveKeySegment *btrieveKeySegment, int keySegmentNumber);
2698 long long GetRecordCount();
2879 const char *GetGatewayName();
2880#ifndef SWIG
2888 Btrieve::StatusCode GetGatewayName(char *name, int nameSize);
2889#endif
2949 const char *GetLockOwnerName();
2950#ifndef SWIG
2958 Btrieve::StatusCode GetLockOwnerName(char *name, int nameSize);
2959#endif
2999#ifndef SWIG
3008#endif
3034 const char *GetSegmentFileName(int segmentFileNumber);
3035#ifndef SWIG
3044 Btrieve::StatusCode GetSegmentFileName(int segmentFileNumber, char *name, int nameSize);
3045#endif
3046
3047 // TODO: Coalesce some of the following.
3307#ifndef SWIG
3316#endif
3324#ifndef SWIG
3333#endif
3341#ifndef SWIG
3350#endif
3358#ifndef SWIG
3367#endif
3375#ifndef SWIG
3384#endif
3385
3386private:
3387 btrieve_file_information_t btrieveFileInformation = NULL;
3388};
3389
3499
3502{
3503 friend class BtrieveFile;
3504
3505protected:
3506 btrieve_bulk_retrieve_attributes_t GetBtrieveBulkRetrieveAttributes();
3507
3508public:
3512
3524 Btrieve::StatusCode AddField(int offset, int length);
3570
3571private:
3572 btrieve_bulk_retrieve_attributes_t bulkRetrieveAttributes = NULL;
3573};
3574
3577{
3578 friend class BtrieveFile;
3579
3580protected:
3581 btrieve_bulk_delete_attributes_t GetBtrieveBulkDeleteAttributes();
3582
3583public:
3586
3619
3620private:
3621 btrieve_bulk_delete_attributes_t bulkDeleteAttributes = NULL;
3622};
3623
3626{
3627 friend class BtrieveFile;
3628
3629protected:
3630 btrieve_bulk_retrieve_result_t GetBtrieveBulkRetrieveResult();
3631
3632public:
3636
3653 int GetRecord(int recordNumber, char *record, int recordSize);
3666 int GetRecordLength(int recordNumber);
3674 long long GetRecordCursorPosition(int recordNumber);
3675
3676private:
3677 btrieve_bulk_retrieve_result_t bulkRetrieveResult = NULL;
3678};
3679
3682{
3683 friend class BtrieveFile;
3684
3685protected:
3686 btrieve_bulk_delete_result_t GetBtrieveBulkDeleteResult();
3687
3688public:
3691
3708 long long GetRecordCursorPosition(int recordNumber);
3709
3710private:
3711 btrieve_bulk_delete_result_t bulkDeleteResult = NULL;
3712};
3713
3716{
3717 friend class BtrieveClient;
3718 friend class BtrieveFile;
3719
3720protected:
3721 btrieve_index_attributes_t GetBtrieveIndexAttributes();
3722
3723public:
3727
3763 Btrieve::StatusCode SetModifiable(bool enableModifiable);
3781 Btrieve::StatusCode SetACSName(const char *ACSName);
3799 Btrieve::StatusCode SetACSUserDefined(const char *ACSName, const char *ACSMap, int ACSMapLength);
3800
3801private:
3802 btrieve_index_attributes_t btrieveIndexAttributes = NULL;
3803};
3804
3807{
3808 friend class BtrieveFile;
3809
3810protected:
3811 btrieve_bulk_create_payload_t GetBtrieveBulkCreatePayload();
3812
3813public:
3817
3827 Btrieve::StatusCode AddRecord(const char *record, int recordLength);
3828
3829private:
3830 btrieve_bulk_create_payload_t btrieveBulkCreatePayload = NULL;
3831};
3832
3835{
3836 friend class BtrieveFile;
3837
3838protected:
3839 btrieve_bulk_create_result_t GetBtrieveBulkCreateResult();
3840
3841public:
3845
3866 long long GetRecordCursorPosition(int recordNumber);
3867
3868private:
3869 btrieve_bulk_create_result_t btrieveBulkCreateResult = NULL;
3870};
3871
4024
4125
4154{
4155 friend class BtrieveClient;
4156
4157protected:
4158 void SetBtrieveClient(BtrieveClient *btrieveClient);
4159 BtrieveFile *GetBtrieveFile();
4160
4161public:
4167
4174 int DocumentCreate(const char *json);
4182 int DocumentCreate(const char *json, const char *blob, int blobLength);
4192 Btrieve::StatusCode DocumentRetrieveBlob(int id, char *blob, int blobSize, int documentBlobOffset = 0, int documentBlobLength = 0);
4199 const char *DocumentRetrieveJson(int id);
4209 const char *DocumentRetrieveJson(int id, char *blob, int blobSize, int documentBlobOffset = 0, int documentBlobLength = 0);
4210#ifndef SWIG
4225 Btrieve::StatusCode DocumentRetrieve(int id, char *json = NULL, int jsonSize = 0, char *blob = NULL, int blobSize = 0, int documentBlobOffset = 0, int documentBlobLength = 0);
4226#endif
4239 Btrieve::StatusCode DocumentUpdate(int id, const char *json);
4248 Btrieve::StatusCode DocumentUpdate(int id, const char *json, const char *blob, int blobLength);
4256 Btrieve::StatusCode DocumentUpdate(int id, int entityTag, const char *json);
4266 Btrieve::StatusCode DocumentUpdate(int id, int entityTag, const char *json, const char *blob, int blobLength);
4273 Btrieve::StatusCode DocumentDelete(int id, int entityTag = -1);
4351 Btrieve::StatusCode Query(BtrieveDocumentSet *btrieveDocumentSet, const char *query = NULL);
4360 Btrieve::StatusCode Encrypt(const char *password, const char *passwordAgain);
4378 Btrieve::StatusCode SetLastStatusCode(Btrieve::StatusCode statusCode);
4380
4381private:
4382 BtrieveClient *btrieveClient = NULL;
4383 BtrieveFile *btrieveFile = NULL;
4385};
4386
4393{
4394 friend class BtrieveCollection;
4395
4396protected:
4397 std::deque<int> *GetStdDeque();
4398
4399public:
4404
4410 int Size();
4421 int PopLast();
4429
4430private:
4431 std::deque<int> *stdDeque = NULL;
4433};
4434
4463class LINKAGE BRestful
4464{
4465public:
4502 static const char *POST(const char *collectionName, const char *json = NULL);
4539 static const char *POST(const char *collectionName, const char *json, const char *blob, int blobLength);
4540
4541// Avoid Windows defining of DELETE.
4542#ifdef DELETE
4543 #undef DELETE
4544#endif
4545
4578 static const char *DELETE(const char *collectionName, int id = -1, int entityTag = -1);
4579
4603 static const char *GET(const char *collectionName, int id);
4630 static const char *GET(const char *collectionName, int id, char *blob, int blobSize, int documentBlobOffset = 0, int documentBlobLength = 0);
4631
4654 static const char *GET(const char *collectionName, const char *query = NULL);
4655
4679 static const char *PUT(const char *collectionName, int id, const char *json);
4705 static const char *PUT(const char *collectionName, int id, const char *json, const char *blob, int blobLength);
4730 static const char *PUT(const char *collectionName, int id, int entityTag, const char *json);
4757 static const char *PUT(const char *collectionName, int id, int entityTag, const char *json, const char *blob, int blobLength);
4758
4759private:
4760 BRestful();
4761 ~BRestful();
4762};
4763
4764#endif
struct btrieve_bulk_create_result * btrieve_bulk_create_result_t
A Btrieve bulk create result.
Definition btrieveC.h:1273
struct btrieve_file_attributes * btrieve_file_attributes_t
A Btrieve file attributes.
Definition btrieveC.h:1309
struct btrieve_filter * btrieve_filter_t
A Btrieve filter.
Definition btrieveC.h:1317
struct btrieve_file * btrieve_file_t
A Btrieve file.
Definition btrieveC.h:1302
struct btrieve_bulk_retrieve_result * btrieve_bulk_retrieve_result_t
A Btrieve bulk retrieve result.
Definition btrieveC.h:1285
#define BTRIEVE_MAXIMUM_BULK_RECORD_COUNT
The Btrieve maximum bulk record count.
Definition btrieveC.h:34
struct btrieve_bulk_delete_attributes * btrieve_bulk_delete_attributes_t
A Btrieve bulk delete attributes.
Definition btrieveC.h:1281
struct btrieve_index_attributes * btrieve_index_attributes_t
A Btrieve index attributes.
Definition btrieveC.h:1324
struct btrieve_bulk_delete_result * btrieve_bulk_delete_result_t
A Btrieve bulk delete result.
Definition btrieveC.h:1289
struct btrieve_bulk_create_payload * btrieve_bulk_create_payload_t
A Btrieve bulk create payload.
Definition btrieveC.h:1269
#define BTRIEVE_MAXIMUM_RECORD_LENGTH
The Btrieve maximum record length.
Definition btrieveC.h:28
#define BTRIEVE_MAXIMUM_KEY_LENGTH
The Btrieve maximum key segment length.
Definition btrieveC.h:31
struct btrieve_bulk_retrieve_attributes * btrieve_bulk_retrieve_attributes_t
A Btrieve bulk retrieve attributes.
Definition btrieveC.h:1277
struct btrieve_file_information * btrieve_file_information_t
A Btrieve file information.
Definition btrieveC.h:1313
struct btrieve_key_segment * btrieve_key_segment_t
A Btrieve key segment.
Definition btrieveC.h:1331
struct btrieve_client * btrieve_client_t
A Btrieve client.
Definition btrieveC.h:1296
struct btrieve_version * btrieve_version_t
A Btrieve version.
Definition btrieveC.h:1335
The BRestful class.
Definition btrieveCpp.h:4464
static const char * PUT(const char *collectionName, int id, int entityTag, const char *json)
Update a document.
static const char * POST(const char *collectionName, const char *json, const char *blob, int blobLength)
Create a collection or document.
static const char * GET(const char *collectionName, const char *query=NULL)
Retrieve document identifiers.
static const char * DELETE(const char *collectionName, int id=-1, int entityTag=-1)
Delete a collection or document.
static const char * PUT(const char *collectionName, int id, int entityTag, const char *json, const char *blob, int blobLength)
Update a document.
static const char * POST(const char *collectionName, const char *json=NULL)
Create a collection or document.
static const char * GET(const char *collectionName, int id)
Retrieve a document.
static const char * GET(const char *collectionName, int id, char *blob, int blobSize, int documentBlobOffset=0, int documentBlobLength=0)
Retrieve a document.
static const char * PUT(const char *collectionName, int id, const char *json, const char *blob, int blobLength)
Update a document.
static const char * PUT(const char *collectionName, int id, const char *json)
Update a document.
The Btrieve bulk create payload class.
Definition btrieveCpp.h:3807
Btrieve::StatusCode AddRecord(const char *record, int recordLength)
Add a record.
The Btrieve bulk create result class.
Definition btrieveCpp.h:3835
long long GetRecordCursorPosition(int recordNumber)
Get the record cursor position.
int GetRecordCount()
Get the record count.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
The Btrieve bulk delete attributes class.
Definition btrieveCpp.h:3577
Btrieve::StatusCode SetMaximumRejectCount(int maximumRejectCount)
Set the maximum reject count.
Btrieve::StatusCode SetSkipCurrentRecord(bool skipCurrentRecord)
Set skip current record.
Btrieve::StatusCode SetMaximumRecordCount(int maximumRecordCount)
Set the maximum record count.
Btrieve::StatusCode AddFilter(BtrieveFilter *btrieveFilter)
Add a filter.
The Btrieve bulk delete result class.
Definition btrieveCpp.h:3682
int GetRecordCount()
Get the record count.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
long long GetRecordCursorPosition(int recordNumber)
Get the record cursor position.
The Btrieve bulk retrieve attributes class.
Definition btrieveCpp.h:3502
Btrieve::StatusCode AddFilter(BtrieveFilter *btrieveFilter)
Add a filter.
Btrieve::StatusCode AddSystemField(Btrieve::SystemField systemField)
Add a system field.
Btrieve::StatusCode AddField(int offset, int length)
Add a field.
Btrieve::StatusCode SetMaximumRecordCount(int maximumRecordCount)
Set the maximum record count.
Btrieve::StatusCode SetMaximumRejectCount(int maximumRejectCount)
Set the maximum reject count.
Btrieve::StatusCode SetSkipCurrentRecord(bool skipCurrentRecord)
Set skip current record.
The Btrieve bulk retrieve result class.
Definition btrieveCpp.h:3626
int GetRecordLength(int recordNumber)
Get the record length.
int GetRecordCount()
Get the record count.
int GetRecord(int recordNumber, char *record, int recordSize)
Get the record.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
long long GetRecordCursorPosition(int recordNumber)
Get the record cursor position.
The Btrieve client class.
Definition btrieveCpp.h:1388
Btrieve::StatusCode CollectionDelete(const char *collectionName)
Delete a collection.
Btrieve::StatusCode FileDelete(const wchar_t *fileName)
Delete a file.
Btrieve::StatusCode Logout(const wchar_t *databaseURI)
Logout.
Btrieve::StatusCode GetCurrentDirectory(Btrieve::DiskDrive diskDrive, char *currentDirectory, int currentDirectorySize)
Get the current directory.
Btrieve::StatusCode Login(const wchar_t *databaseURI)
Login.
Btrieve::StatusCode ContinuousOperationBegin(const char *pathNames)
Begin continuous operation.
Btrieve::StatusCode ContinuousOperationBegin(const wchar_t *pathNames)
Begin continuous operation.
Btrieve::StatusCode Logout(const char *databaseURI)
Logout.
Btrieve::StatusCode ContinuousOperationEnd(const char *pathNames)
End continuous operation.
int GetServiceAgentIdentifier()
Get the service agent identifier.
Btrieve::StatusCode SetCurrentDirectory(const char *currentDirectory)
Set the current directory.
Btrieve::StatusCode TransactionBegin(Btrieve::TransactionMode transactionMode, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Begin a transaction.
Btrieve::StatusCode FileCreate(BtrieveFileAttributes *btrieveFileAttributes, const char *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
Create a file.
const char * GetCurrentDirectory(Btrieve::DiskDrive diskDrive)
Get the current directory.
Btrieve::StatusCode CollectionRename(const char *existingCollectionName, const char *newCollectionName)
Rename a collection.
Btrieve::StatusCode ContinuousOperationEnd(const wchar_t *pathNames)
End continuous operation.
BtrieveClient(int serviceAgentIdentifier, int clientIdentifier)
Btrieve::StatusCode FileClose(BtrieveFile *btrieveFile)
Close a file.
Btrieve::StatusCode FileRename(const wchar_t *existingFileName, const wchar_t *newFileName)
Rename a file.
Btrieve::StatusCode Reset()
Reset.
Btrieve::StatusCode TransactionEnd()
End a transaction.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
Btrieve::StatusCode GetVersion(BtrieveVersion *btrieveVersion, BtrieveFile *btrieveFile=NULL)
Get the version.
Btrieve::StatusCode FileRename(const char *existingFileName, const char *newFileName)
Rename a file.
Btrieve::StatusCode FileOpen(BtrieveFile *btrieveFile, const wchar_t *fileName, const char *ownerName, Btrieve::OpenMode openMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
Open a file.
Btrieve::StatusCode FileCreate(BtrieveFileAttributes *btrieveFileAttributes, BtrieveIndexAttributes *btrieveIndexAttributes, const char *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
Create a file.
Btrieve::StatusCode FileDelete(const char *fileName)
Delete a file.
Btrieve::StatusCode Login(const char *databaseURI)
Login.
Btrieve::StatusCode CollectionClose(BtrieveCollection *btrieveCollection)
Close a collection.
Btrieve::StatusCode SetCurrentDirectory(const wchar_t *currentDirectory)
Set the current directory.
Btrieve::StatusCode FileOpen(BtrieveFile *btrieveFile, const char *fileName, const char *ownerName, Btrieve::OpenMode openMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
Open a file.
Btrieve::StatusCode CollectionOpen(BtrieveCollection *btrieveCollection, const char *collectionName, const char *password=NULL)
Open a collection.
Btrieve::StatusCode CollectionCreate(const char *collectionName)
Create a collection.
Btrieve::StatusCode TransactionAbort()
Abort a transaction.
int GetClientIdentifier()
Get the client identifier.
Btrieve::StatusCode FileCreate(BtrieveFileAttributes *btrieveFileAttributes, const wchar_t *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
Create a file.
Btrieve::StatusCode GetCurrentDirectory(Btrieve::DiskDrive diskDrive, wchar_t *currentDirectory, int currentDirectorySize)
Get the current directory.
Btrieve::StatusCode FileCreate(BtrieveFileAttributes *btrieveFileAttributes, BtrieveIndexAttributes *btrieveIndexAttributes, const wchar_t *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
Create a file.
Btrieve::StatusCode Stop()
Stop.
The Btrieve collection class.
Definition btrieveCpp.h:4154
int DocumentRetrieveEntityTag(int id)
Retrieve a document entity tag.
Btrieve::StatusCode DocumentUpdate(int id, int entityTag, const char *json, const char *blob, int blobLength)
Update a document.
Btrieve::StatusCode DocumentDelete(int id, int entityTag=-1)
Delete a document.
Btrieve::StatusCode Decrypt()
Decrypt a collection.
int DocumentCreate(const char *json, const char *blob, int blobLength)
Create a document.
const char * DocumentRetrieveJson(int id)
Retrieve a document json.
Btrieve::StatusCode DocumentUpdate(int id, int entityTag, const char *json)
Update a document.
Btrieve::StatusCode DocumentUpdate(int id, const char *json, const char *blob, int blobLength)
Update a document.
Btrieve::StatusCode DocumentUpdate(int id, const char *json)
Update a document.
Btrieve::StatusCode DocumentRetrieveBlob(int id, char *blob, int blobSize, int documentBlobOffset=0, int documentBlobLength=0)
Retrieve a document blob.
Btrieve::StatusCode Encrypt(const char *password, const char *passwordAgain)
Encrypt a collection.
Btrieve::StatusCode Query(BtrieveDocumentSet *btrieveDocumentSet, const char *query=NULL)
Query the collection.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
int DocumentCreate(const char *json)
Create a document.
Btrieve::StatusCode DocumentRetrieve(int id, char *json=NULL, int jsonSize=0, char *blob=NULL, int blobSize=0, int documentBlobOffset=0, int documentBlobLength=0)
Retrieve a document.
const char * DocumentRetrieveJson(int id, char *blob, int blobSize, int documentBlobOffset=0, int documentBlobLength=0)
Retrieve a document json.
The Btrieve document set class.
Definition btrieveCpp.h:4393
int PopFirst()
Remove and return the first document identifier from the set.
int PopLast()
Remove and return the last document identifier from the set.
int Size()
Return the number of document identifiers in the set.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
The Btrieve file attributes class.
Definition btrieveCpp.h:2448
Btrieve::StatusCode SetFileVersion(Btrieve::FileVersion fileVersion)
Set the file version.
Btrieve::StatusCode SetVariableLengthRecordsMode(Btrieve::VariableLengthRecordsMode variableLengthRecordsMode)
Set the variable length records mode.
Btrieve::StatusCode SetPageSize(Btrieve::PageSize pageSize, bool enablePageCompression=false)
Set the page size.
Btrieve::StatusCode SetPreallocatedPageCount(int preallocatedPageCount)
Set the preallocated page count.
Btrieve::StatusCode SetReservedDuplicatePointerCount(int reservedDuplicatePointerCount)
Set the reserved duplicate pointer count.
Btrieve::StatusCode SetRecordCompressionMode(Btrieve::RecordCompressionMode recordCompressionMode)
Set record compression mode.
Btrieve::StatusCode SetSystemDataMode(Btrieve::SystemDataMode systemDataMode)
Set the system data mode.
Btrieve::StatusCode SetKeyOnly(bool enableKeyOnly)
Set key only.
Btrieve::StatusCode SetFreeSpaceThreshold(Btrieve::FreeSpaceThreshold freeSpaceThreshold)
Set the free space threshold.
Btrieve::StatusCode SetBalancedIndexes(bool enableBalancedIndexes)
Set balanced indexes.
Btrieve::StatusCode SetFixedRecordLength(int fixedRecordLength)
Set the fixed record length.
The Btrieve file information class.
Definition btrieveCpp.h:2576
int GetUnusedPageCount()
Get the unused page count.
Btrieve::Index GetLockOwnerIndex()
Get the lock owner index.
Btrieve::RecordCompressionMode GetRecordCompressionMode()
Get the record compression mode.
int GetWrongOwner()
Get wrong owner.
int GetSystemIndex()
Get system index.
int GetSystemIndexSize()
Get the system index size.
int GetSecurityCurrentDatabaseRTSSDisabled()
Get security current database RTSS (Runtime Server Support) disabled.
Btrieve::Index GetDuplicateRecordConflictIndex()
Get the duplicate record conflict index.
int GetSecurityCurrentDatabaseImplicit()
Get security current database implicit.
int GetBalancedIndexes()
Get balanced indexes.
int GetLockOwnerServiceAgentIdentifier()
Get the lock owner service agent identifier.
int GetSecurityPermissionCreateView()
Get security permission create view.
const char * GetSecurityHandleTableName()
Get the security handle table name.
int GetExplicitLocks()
Get explicit locks.
int GetSecurityCurrentDatabasePAM()
Get security current database PAM (Pluggable Authentication Module).
int GetSecurityHandleWorkgroup()
Get security handle workgroup.
int GetLoggable()
Get loggable.
const char * GetReferentialIntegrityFileName()
Get the referential integrity file name.
long long GetDuplicateRecordConflictCursorPosition()
Get the duplicate record conflict cursor position.
Btrieve::SystemDataMode GetSystemDataMode()
Get the system data mode.
Btrieve::StatusCode GetSecurityHandleDatabaseName(char *name, int nameSize)
Get the security handle database name.
int GetSecurityHandleImplicit()
Get security handle implicit.
int GetClientTransactions()
Get client transactions.
const char * GetGatewayName()
Get the gateway name.
const char * GetSecurityCurrentUserName()
Get the security current user name.
const char * GetSecurityHandleDatabaseName()
Get the security handle database name.
Btrieve::FileVersion GetFileVersion()
Get the file version.
Btrieve::StatusCode GetSegmentFileName(int segmentFileNumber, char *name, int nameSize)
Get the segment file name.
int GetSecurityPermissionOpen()
Get security permission open.
int GetSecurityHandlePAM()
Get security handle PAM (Pluggable Authentication Module).
int GetHandleCount()
Get the handle count.
int GetLockOwnerSameProcess()
Get lock owner same process.
int GetGatewayPlatform()
Get the gateway platform.
Btrieve::EncryptType GetEncryptionType()
Get the file encryption type.
int GetSecurityCurrentDatabaseExplicit()
Get security current database explicit.
int GetSystemData()
Get system data.
Btrieve::StatusCode GetSecurityCurrentDatabaseName(char *name, int nameSize)
Get the security current database name.
int GetIndexCount()
Get the index count.
const char * GetSegmentFileName(int segmentFileNumber)
Get the segment file name.
Btrieve::PageLockType GetLockOwnerPageLockType()
Get the lock owner page lock type.
int GetUnusedDuplicatePointerCount()
Get the unused duplicate pointer count.
int GetGatewayPatchLevel()
Get the gateway patch level.
Btrieve::StatusCode GetSecurityHandleUserName(char *name, int nameSize)
Get the security handle user name.
const char * GetLockOwnerName()
Get the lock owner name.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
int GetSecurityHandleExplicit()
Get security handle explicit.
Btrieve::LockMode GetLockOwnerExplicitLockMode()
Get the lock owner explcit lock mode.
int GetSecurityCurrentDatabaseAuthenticationByDatabase()
Get security current database authentication by database.
long long GetReferentialIntegrityCursorPosition()
Get the referential integrity cursor position.
Btrieve::OwnerMode GetOwnerMode()
Get the owner mode.
int GetReferentialIntegrityConstraints()
Get referential integrity constraints.
int GetSecurityHandleAuthorizationByDatabase()
Get security handle authorization by database.
int GetSystemIndexVersion()
Get the system index version.
int GetPageCompression()
Get page compression.
int GetSecurityHandleBtpasswd()
Get security handle Btpasswd.
int GetLockOwnerWriteHold()
Get lock owner write hold.
int GetIdentifier()
Get the identifier.
int GetSecurityCurrentDatabaseTrusted()
Get security current database trusted.
int GetSegmented()
Get segmented.
int GetLockOwnerWriteNoWait()
Get lock owner write no wait.
int GetSecurityHandleAuthenticationByDatabase()
Get security handle authentication by database.
int GetSecurityPermissionAlter()
Get security permission alter.
int GetLockOwnerTimeInTransaction()
Get the lock owner time in transaction.
int GetPagePreallocation()
Get page preallocation.
long long GetRecordCount()
Get the record count.
int GetSecurityHandleRTSSComplete()
Get security handle RTSS (Runtime Server Support) complete.
int GetGatewayMajorVersion()
Get the gateway major version.
int GetSecurityCurrentDatabaseBtpasswd()
Get security current database Btpasswd.
Btrieve::Index GetLogIndex()
Get the log index.
int GetUsageCount()
Get the usage count.
int GetSecurityHandleRTSSPreauthorized()
Get security handle RTSS (Runtime Server Support) preautorized.
Btrieve::PageSize GetPageSize()
Get the page size.
Btrieve::StatusCode GetReferentialIntegrityFileName(char *name, int nameSize)
Get the referential integrity file name.
int GetSecurityCurrentDatabaseAuthorizationByDatabase()
Get security current database authorization by database.
int GetSecurityHandleTrusted()
Get security handle trusted.
Btrieve::VariableLengthRecordsMode GetVariableLengthRecordsMode()
Get the variable length records mode.
const char * GetSecurityHandleUserName()
Get the security handle user name.
const char * GetSecurityCurrentDatabaseName()
Get the security current database name.
int GetReadOnly()
Get read only.
Btrieve::StatusCode GetKeySegment(BtrieveKeySegment *btrieveKeySegment, int keySegmentNumber)
Get a key segment.
Btrieve::StatusCode GetSecurityCurrentUserName(char *name, int nameSize)
Get the security current user name.
int GetSecurityHandleRTSSDisabled()
Get security handle RTSS (Runtime Server Support) disabled.
int GetLockOwnerRecordLock()
Get lock owner record lock.
int GetKeyOnly()
Get key only.
int GetSecurityPermissionRefer()
Get security permission refer.
Btrieve::StatusCode GetGatewayName(char *name, int nameSize)
Get the gateway name.
int GetLockOwnerTransactionLevel()
Get the lock owner transaction level.
int GetContinuousOperation()
Get continuous operation.
int GetLockOwnerImplicitLock()
Get lock owner implicit lock.
int GetSecurityPermissionCreateRecord()
Get security permission record create.
int GetSecurityPermissionCreateFile()
Get security permission file create.
int GetSecurityPermissionRead()
Get security permission read.
int GetSecurityCurrentDatabaseWindowsNamedPipe()
Get security current database Windows named pipe.
int GetSecurityPermissionCreateStoredProcedure()
Get security permission create stored procedure.
Btrieve::StatusCode GetSecurityHandleTableName(char *name, int nameSize)
Get the security handle table name.
int GetGatewayMinorVersion()
Get the gateway minor version.
int GetLockOwnerClientIdentifier()
Get the lock owner client identifier.
int GetSegmentCount()
Get the segment count.
int GetSecurityPermissionUpdate()
Get security permission update.
int GetSecurityPermissionDelete()
Get security permission delete.
int GetSecurityPermissionNoRights()
Get security permission no rights.
int GetFixedRecordLength()
Get the fixed record length.
Btrieve::StatusCode GetLockOwnerName(char *name, int nameSize)
Get the lock owner name.
int GetSecurityHandleWindowsNamedPipe()
Get security handle Windows named pipe.
int GetSecurityCurrentDatabaseRTSSComplete()
Get security current database RTSS (Runtime Server Support) complete.
Btrieve::FreeSpaceThreshold GetFreeSpaceThreshold()
Get the free space threshold.
int GetSecurityCurrentDatabaseWorkgroup()
Get security current database workgroup.
int GetOpenTimestamp()
Get the open timestamp.
int GetSecurityCurrentDatabaseRTSSPreauthorized()
Get security current database RTSS (Runtime Server Support) preauthorized.
int GetSecurityPermissionExecute()
Get security permission execute.
int GetReferentialIntegrityOperationCode()
Get the referential integrity operation code.
int GetLockOwnerFileLock()
Get lock owner file lock.
The Btrieve file class.
Definition btrieveCpp.h:1729
Btrieve::StatusCode IndexDrop(Btrieve::Index index)
Drop an index.
int GetPercentage(long long cursorPosition)
Get the percentage which best approximates the location of the cursor position within the file.
int RecordRetrieveLast(Btrieve::Index index, char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve the last record.
Btrieve::StatusCode KeyRetrieveLast(Btrieve::Index index, char *key, int keySize)
Retrieve the last key.
int RecordRetrieveByFraction(Btrieve::Index index, int numerator, int denominator, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve a record by fraction.
int GetNumerator(long long cursorPosition, int denominator)
Get the numerator which best approximates the location of the cursor position within the file relativ...
Btrieve::StatusCode RecordUpdate(const char *record, int recordLength)
Update a record.
int RecordRetrievePrevious(char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve the previous record.
Btrieve::StatusCode RecordInsertChunk(int offset, const char *chunk, int chunkLength)
Insert a record chunk.
Btrieve::StatusCode RecordTruncate()
Truncate a record at the current offset.
Btrieve::StatusCode RecordCreate(char *record, int recordLength)
Create a record.
int RecordRetrieveByPercentage(Btrieve::Index index, int percentage, char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve a record by percentage.
Btrieve::StatusCode RecordDelete()
Delete a record.
Btrieve::StatusCode KeyRetrieveFirst(Btrieve::Index index, char *key, int keySize)
Retrieve the first key.
int RecordRetrieve(Btrieve::Comparison comparison, Btrieve::Index index, char *key, int keyLength, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve a record using the given comparison, index, and key.
int RecordRetrieveChunk(int length, char *chunk, int chunkSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve a record chunk at the current offset.
Btrieve::StatusCode RecordDeleteChunk(int chunkLength)
Delete a record chunk at the current offset.
Btrieve::StatusCode KeyRetrieve(Btrieve::Comparison comparison, Btrieve::Index index, char *key, int keyLength)
Retrieve a key using the given comparison, index, and key.
Btrieve::StatusCode RecordInsertChunk(const char *chunk, int chunkLength)
Insert a record chunk at the current offset.
Btrieve::StatusCode IndexCreate(BtrieveIndexAttributes *btrieveIndexAttributes)
Create an index.
int RecordRetrieveNext(char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve the next record.
int RecordRetrieveFirst(Btrieve::Index index, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve the first record.
Btrieve::StatusCode SetOwner(Btrieve::OwnerMode ownerMode, const char *ownerName=NULL, const char *ownerNameAgain=NULL, bool useLongOwnerName=true)
Set the owner.
Btrieve::StatusCode BulkRetrievePrevious(BtrieveBulkRetrieveAttributes *bulkRetrieveAttributes, BtrieveBulkRetrieveResult *bulkRetrieveResult, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve bulk previous.
int GetPercentage(Btrieve::Index index, const char *key, int keyLength)
Get the percentage which best approximates the location of the key within the given index.
int RecordRetrieveFirst(Btrieve::Index index, char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve the first record.
Btrieve::StatusCode KeyRetrievePrevious(char *key, int keySize)
Retrieve the previous key.
long long GetRecordCreateTime()
Get the record create time.
Btrieve::StatusCode KeyRetrieveNext(char *key, int keySize)
Retrieve the next key.
int RecordRetrieveLast(Btrieve::Index index, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve the last record.
Btrieve::StatusCode RecordDeleteChunk(int offset, int chunkLength)
Delete a record chunk.
Btrieve::StatusCode BulkRetrieveNext(BtrieveBulkRetrieveAttributes *bulkRetrieveAttributes, BtrieveBulkRetrieveResult *bulkRetrieveResult, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve bulk next.
Btrieve::StatusCode BulkCreate(BtrieveBulkCreatePayload *btrieveBulkCreatePayload, BtrieveBulkCreateResult *btrieveBulkCreateResult)
Bulk create.
int RecordRetrieveNext(char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve the next record.
Btrieve::StatusCode BulkDeletePrevious(BtrieveBulkDeleteAttributes *bulkDeleteAttributes, BtrieveBulkDeleteResult *bulkDeleteResult)
Delete bulk previous.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
int RecordRetrievePrevious(char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve the previous record.
Btrieve::StatusCode RecordTruncate(int offset)
Truncate a record.
Btrieve::StatusCode RecordAppendChunk(const char *chunk, int chunkLength)
Append a record chunk.
int GetNumerator(Btrieve::Index index, const char *key, int keyLength, int denominator)
Get the numerator which best approximates the location of the key within the index relative to the de...
int RecordRetrieveByCursorPosition(Btrieve::Index index, long long cursorPosition, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve a record by cursor position.
Btrieve::StatusCode RecordUpdateChunk(const char *chunk, int chunkLength)
Update a record chunk at the current offset.
Btrieve::StatusCode UnlockCursorPosition(long long cursorPosition)
Unlock the cursor position.
int RecordRetrieveByCursorPosition(Btrieve::Index index, long long cursorPosition, char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve a record by cursor position.
Btrieve::StatusCode GetInformation(BtrieveFileInformation *btrieveFileInformation)
Get the file information.
long long GetCursorPosition()
Get the cursor position.
int RecordRetrieveChunk(int offset, int length, char *chunk, int chunkSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve a record chunk.
Btrieve::StatusCode BulkDeleteNext(BtrieveBulkDeleteAttributes *bulkDeleteAttributes, BtrieveBulkDeleteResult *bulkDeleteResult)
Delete bulk next.
Btrieve::StatusCode RecordUnlock(Btrieve::UnlockMode unlockMode)
Unlock a record or records.
Btrieve::StatusCode RecordUpdateChunk(int offset, const char *chunk, int chunkLength)
Update a record chunk.
int RecordRetrieveByFraction(Btrieve::Index index, int numerator, int denominator, char *key, int keySize, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve a record by fraction.
long long GetRecordUpdateTime()
Get the record update time.
int RecordRetrieveByPercentage(Btrieve::Index index, int percentage, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
Retrieve a record by percentage.
The Btrieve filter class.
Definition btrieveCpp.h:3392
Btrieve::StatusCode SetComparisonConstant(const char *constant, int constantLength)
Set the comparison constant.
Btrieve::StatusCode SetACSUserDefined(const char *name)
Set the user defined alternate collation sequence name.
Btrieve::StatusCode SetSystemField(Btrieve::SystemField systemField)
Set the system field.
Btrieve::StatusCode SetACSMode(Btrieve::ACSMode ACSMode)
Set the alternate collation sequence mode.
Btrieve::StatusCode SetACSName(const char *name)
Set the alternate collation sequence name.
Btrieve::StatusCode SetComparison(Btrieve::Comparison comparison)
Set the comparison.
Btrieve::StatusCode SetLikeCodePageName(const char *name)
Set the code page name to be used for the comparison types Like or Not Like.
Btrieve::StatusCode SetField(int offset, int length, Btrieve::DataType dataType)
Set the field.
Btrieve::StatusCode SetConnector(Btrieve::Connector connector)
Set the field connector.
Btrieve::StatusCode SetComparisonField(int offset)
Set the comparison field.
The Btrieve index attributes class.
Definition btrieveCpp.h:3716
Btrieve::StatusCode SetACSNumber(int ACSNumber)
Set the alternate collation sequence number.
Btrieve::StatusCode AddKeySegment(BtrieveKeySegment *btrieveKeySegment)
Add a key segment.
Btrieve::StatusCode SetACSMode(Btrieve::ACSMode ACSMode)
Set the alternate collation sequence mode.
Btrieve::StatusCode SetDuplicateMode(Btrieve::DuplicateMode duplicateMode)
Set the duplicate mode.
Btrieve::StatusCode SetACSUserDefined(const char *ACSName, const char *ACSMap, int ACSMapLength)
Set the user defined alternate collation sequence.
Btrieve::StatusCode SetModifiable(bool enableModifiable)
Set modifiable.
Btrieve::StatusCode SetACSName(const char *ACSName)
Set the alternate collation sequence name.
Btrieve::StatusCode SetIndex(Btrieve::Index index)
Set the index.
The Btrieve key segment class.
Definition btrieveCpp.h:3874
Btrieve::DuplicateMode GetDuplicateMode()
Get the duplicate mode.
Btrieve::StatusCode SetField(int offset, int length, Btrieve::DataType dataType)
Set the field.
int GetLength()
Get the length.
int GetOffset()
Get the offset.
long long GetUniqueValueCount()
Get the unique value count.
Btrieve::StatusCode SetNullValue(int nullValue)
Set the null value.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
Btrieve::DataType GetDataType()
Get the data type.
int GetACSNumber()
Get the alternate collation sequence number.
Btrieve::NullKeyMode GetNullKeyMode()
Get the null key mode.
int GetKeyContinues()
Get key continues.
Btrieve::Index GetIndex()
Get the index.
int GetModifiable()
Get modifiable.
Btrieve::StatusCode SetNullKeyMode(Btrieve::NullKeyMode nullKeyMode)
Set the null key mode.
int GetNullValue()
Get the null value.
int GetDescendingSortOrder()
Get descending sort order.
Btrieve::StatusCode SetDescendingSortOrder(bool setDescendingSortOrder)
Set descending sort order.
Btrieve::ACSMode GetACSMode()
Get the alternate collation sequence mode.
The Btrieve version class.
Definition btrieveCpp.h:4027
int GetClientRevisionNumber()
Get the client revision number.
Btrieve::VersionType GetRemoteVersionType()
Get the remote version type.
int GetLocalRevisionNumber()
Get the local revision number.
int GetLocalVersionNumber()
Get the local version number.
int GetRemoteRevisionNumber()
Get the remote revision number.
int GetRemoteVersionNumber()
Get the remote version number.
Btrieve::VersionType GetLocalVersionType()
Get the local version type.
int GetClientVersionNumber()
Get the client version number.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
Btrieve::VersionType GetClientVersionType()
Get the client version type.
The Btrieve class.
Definition btrieveCpp.h:40
VariableLengthRecordsMode
The Btrieve variable length records modes.
Definition btrieveCpp.h:1239
static const char * PageSizeToString(PageSize pageSize)
Return a page size as a string.
static const char * FreeSpaceThresholdToString(FreeSpaceThreshold freeSpaceThreshold)
Return a free space threshold as a string.
static const char * VariableLengthRecordsModeToString(VariableLengthRecordsMode variableLengthRecordsMode)
Return a variable length records mode as a string.
static const char * RecordCompressionModeToString(RecordCompressionMode recordCompressionMode)
Return an record compression mode as a string.
static const char * SystemFieldToString(SystemField systemField)
Return a system field as a string.
SystemDataMode
The Btrieve system data modes.
Definition btrieveCpp.h:1200
FileVersion
The Btrieve file versions.
Definition btrieveCpp.h:267
static long long TimestampToUnixEpochMicroseconds(long long timestamp)
Convert a Btrieve TIMESTAMP to a Unix Epoch timestamp in microseconds.
Comparison
The Btrieve comparisons.
Definition btrieveCpp.h:81
TransactionMode
The Btrieve transaction modes.
Definition btrieveCpp.h:1214
static const char * ACSModeToString(ACSMode ACSMode)
Return an alternate collation sequence mode as a string.
static const char * StatusCodeToString(StatusCode statusCode)
Return a status code as a string.
static const char * NullKeyModeToString(NullKeyMode nullKeyMode)
Return a null key mode as a string.
PageLockType
The Btrieve page lock type.
Definition btrieveCpp.h:655
LockMode
The Btrieve lock modes.
Definition btrieveCpp.h:573
@ LOCK_MODE_NONE
None.
Definition btrieveCpp.h:575
static const char * OwnerModeToString(OwnerMode ownerMode)
Return an owner mode as a string.
DiskDrive
The Btrieve disk drives.
Definition btrieveCpp.h:121
PageSize
The Btrieve page sizes.
Definition btrieveCpp.h:671
CreateMode
The Btrieve create modes.
Definition btrieveCpp.h:70
StatusCode
The Btrieve status codes.
Definition btrieveCpp.h:713
@ STATUS_CODE_NO_ERROR
0 - No error.
Definition btrieveCpp.h:715
static const char * SystemDataModeToString(SystemDataMode systemDataMode)
Return a system data mode as a string.
static const char * VersionTypeToString(VersionType versionType)
Return a version type as a string.
static const char * DuplicateModeToString(DuplicateMode duplicateMode)
Return a duplicate mode as a string.
DuplicateMode
The Btrieve duplicate modes.
Definition btrieveCpp.h:183
FreeSpaceThreshold
The Btrieve free space thresholds.
Definition btrieveCpp.h:293
NullKeyMode
The Btrieve null key modes.
Definition btrieveCpp.h:591
OpenMode
The Btrieve open modes.
Definition btrieveCpp.h:604
VersionType
The Btrieve version types.
Definition btrieveCpp.h:1252
Connector
The Btrieve connectors.
Definition btrieveCpp.h:108
static const char * PageLockTypeToString(PageLockType pageLockType)
Return a page lock type as a string.
ACSMode
The Btrieve alternate collation sequence modes.
Definition btrieveCpp.h:53
UnlockMode
The Btrieve unlock modes.
Definition btrieveCpp.h:1227
SystemField
The Btrieve system fields.
Definition btrieveCpp.h:1275
LocationMode
The Btrieve location modes.
Definition btrieveCpp.h:559
@ LOCATION_MODE_NO_PREFERENCE
No preference.
Definition btrieveCpp.h:561
OwnerMode
The Btrieve file owner modes.
Definition btrieveCpp.h:621
static const char * EncryptTypeToString(EncryptType encryptType)
Return the encryption type as a string.
static const char * LockModeToString(LockMode lockMode)
Return a lock mode as a string.
static long long UnixEpochMicrosecondsToTimestamp(long long microseconds)
Convert a Unix Epoch based timestamp in microseconds to a TIMESTAMP.
RecordCompressionMode
The Btrieve record compression modes.
Definition btrieveCpp.h:699
static const char * FileVersionToString(FileVersion fileVersion)
Return a file version as a string.
static const char * IndexToString(Index index)
Return an index as a string.
EncryptType
The Btrieve file encryption types.
Definition btrieveCpp.h:638
DataType
The Btrieve data types.
Definition btrieveCpp.h:197
static const char * DataTypeToString(DataType dataType)
Return a data type as a string.
Index
The Btrieve indexes.
Definition btrieveCpp.h:309