Btrieve 2
|
The Btrieve client class. More...
#include <btrieveCpp.h>
Public Member Functions | |
BtrieveClient () | |
BtrieveClient (int serviceAgentIdentifier, int clientIdentifier) | |
~BtrieveClient () | |
Btrieve::StatusCode | CollectionClose (BtrieveCollection *btrieveCollection) |
Close a collection. | |
Btrieve::StatusCode | CollectionCreate (const char *collectionName) |
Create a collection. | |
Btrieve::StatusCode | CollectionDelete (const char *collectionName) |
Delete a collection. | |
Btrieve::StatusCode | CollectionOpen (BtrieveCollection *btrieveCollection, const char *collectionName, const char *password=NULL) |
Open a collection. | |
Btrieve::StatusCode | CollectionRename (const char *existingCollectionName, const char *newCollectionName) |
Rename a collection. | |
Btrieve::StatusCode | ContinuousOperationBegin (const char *pathNames) |
Begin continuous operation. | |
Btrieve::StatusCode | ContinuousOperationBegin (const wchar_t *pathNames) |
Begin continuous operation. | |
Btrieve::StatusCode | ContinuousOperationEnd (const char *pathNames) |
End continuous operation. | |
Btrieve::StatusCode | ContinuousOperationEnd (const wchar_t *pathNames) |
End continuous operation. | |
Btrieve::StatusCode | FileClose (BtrieveFile *btrieveFile) |
Close 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 | 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 | FileCreate (BtrieveFileAttributes *btrieveFileAttributes, const char *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE) |
Create a file. | |
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 | FileDelete (const char *fileName) |
Delete a file. | |
Btrieve::StatusCode | FileDelete (const wchar_t *fileName) |
Delete a file. | |
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 | 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 | FileRename (const char *existingFileName, const char *newFileName) |
Rename a file. | |
Btrieve::StatusCode | FileRename (const wchar_t *existingFileName, const wchar_t *newFileName) |
Rename a file. | |
int | GetClientIdentifier () |
Get the client identifier. | |
const char * | GetCurrentDirectory (Btrieve::DiskDrive diskDrive) |
Get the current directory. | |
Btrieve::StatusCode | GetCurrentDirectory (Btrieve::DiskDrive diskDrive, char *currentDirectory, int currentDirectorySize) |
Get the current directory. | |
Btrieve::StatusCode | GetCurrentDirectory (Btrieve::DiskDrive diskDrive, wchar_t *currentDirectory, int currentDirectorySize) |
Get the current directory. | |
Btrieve::StatusCode | GetLastStatusCode () |
Get the last status code. | |
int | GetServiceAgentIdentifier () |
Get the service agent identifier. | |
Btrieve::StatusCode | GetVersion (BtrieveVersion *btrieveVersion, BtrieveFile *btrieveFile=NULL) |
Get the version. | |
Btrieve::StatusCode | Login (const char *databaseURI) |
Login. | |
Btrieve::StatusCode | Login (const wchar_t *databaseURI) |
Login. | |
Btrieve::StatusCode | Logout (const char *databaseURI) |
Logout. | |
Btrieve::StatusCode | Logout (const wchar_t *databaseURI) |
Logout. | |
Btrieve::StatusCode | Reset () |
Reset. | |
Btrieve::StatusCode | SetCurrentDirectory (const char *currentDirectory) |
Set the current directory. | |
Btrieve::StatusCode | SetCurrentDirectory (const wchar_t *currentDirectory) |
Set the current directory. | |
Btrieve::StatusCode | Stop () |
Stop. | |
Btrieve::StatusCode | TransactionAbort () |
Abort a transaction. | |
Btrieve::StatusCode | TransactionBegin (Btrieve::TransactionMode transactionMode, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Begin a transaction. | |
Btrieve::StatusCode | TransactionEnd () |
End a transaction. | |
The Btrieve client class.
BtrieveClient::BtrieveClient | ( | ) |
BtrieveClient::BtrieveClient | ( | int | serviceAgentIdentifier, |
int | clientIdentifier ) |
[in] | serviceAgentIdentifier | The service agent identifier. Use 0 to automatically generate a service agent identifier based on the caller's process identifier. |
[in] | clientIdentifier | The client identifier. Use 0 to automatically generate a client identifier based on the caller's thread identifier. |
BtrieveClient::~BtrieveClient | ( | ) |
Btrieve::StatusCode BtrieveClient::CollectionClose | ( | BtrieveCollection * | btrieveCollection | ) |
Close a collection.
[in] | btrieveCollection | The Btrieve collection. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::CollectionCreate | ( | const char * | collectionName | ) |
Create a collection.
[in] | collectionName | The collection name. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::CollectionDelete | ( | const char * | collectionName | ) |
Delete a collection.
[in] | collectionName | The collection name. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::CollectionOpen | ( | BtrieveCollection * | btrieveCollection, |
const char * | collectionName, | ||
const char * | password = NULL ) |
Open a collection.
[out] | btrieveCollection | The Btrieve collection. |
[in] | collectionName | The collection name. |
[in] | password | The password. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::CollectionRename | ( | const char * | existingCollectionName, |
const char * | newCollectionName ) |
Rename a collection.
[in] | existingCollectionName | The existing collection name. |
[in] | newCollectionName | The new collection name. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::ContinuousOperationBegin | ( | const char * | pathNames | ) |
Begin continuous operation.
[in] | pathNames | The path names. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::ContinuousOperationBegin | ( | const wchar_t * | pathNames | ) |
Begin continuous operation.
[in] | pathNames | The path names. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::ContinuousOperationEnd | ( | const char * | pathNames | ) |
End continuous operation.
[in] | pathNames | The path names. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::ContinuousOperationEnd | ( | const wchar_t * | pathNames | ) |
End continuous operation.
[in] | pathNames | The path names. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileClose | ( | BtrieveFile * | btrieveFile | ) |
Close a file.
[in] | btrieveFile | The Btrieve file. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileCreate | ( | BtrieveFileAttributes * | btrieveFileAttributes, |
BtrieveIndexAttributes * | btrieveIndexAttributes, | ||
const char * | fileName, | ||
Btrieve::CreateMode | createMode, | ||
Btrieve::LocationMode | locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE ) |
Create a file.
[in] | btrieveFileAttributes | The file attributes. |
[in] | btrieveIndexAttributes | The index attributes. |
[in] | fileName | The file name. |
[in] | createMode | The create mode. |
[in] | locationMode | The location mode. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileCreate | ( | BtrieveFileAttributes * | btrieveFileAttributes, |
BtrieveIndexAttributes * | btrieveIndexAttributes, | ||
const wchar_t * | fileName, | ||
Btrieve::CreateMode | createMode, | ||
Btrieve::LocationMode | locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE ) |
Create a file.
[in] | btrieveFileAttributes | The file attributes. |
[in] | btrieveIndexAttributes | The index attributes. |
[in] | fileName | The file name. |
[in] | createMode | The create mode. |
[in] | locationMode | The location mode. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileCreate | ( | BtrieveFileAttributes * | btrieveFileAttributes, |
const char * | fileName, | ||
Btrieve::CreateMode | createMode, | ||
Btrieve::LocationMode | locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE ) |
Create a file.
[in] | btrieveFileAttributes | The file attributes. |
[in] | fileName | The file name. |
[in] | createMode | The create mode. |
[in] | locationMode | The location mode. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileCreate | ( | BtrieveFileAttributes * | btrieveFileAttributes, |
const wchar_t * | fileName, | ||
Btrieve::CreateMode | createMode, | ||
Btrieve::LocationMode | locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE ) |
Create a file.
[in] | btrieveFileAttributes | The file attributes. |
[in] | fileName | The file name. |
[in] | createMode | The create mode. |
[in] | locationMode | The location mode. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileDelete | ( | const char * | fileName | ) |
Delete a file.
[in] | fileName | The file name. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileDelete | ( | const wchar_t * | fileName | ) |
Delete a file.
[in] | fileName | The file name. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileOpen | ( | BtrieveFile * | btrieveFile, |
const char * | fileName, | ||
const char * | ownerName, | ||
Btrieve::OpenMode | openMode, | ||
Btrieve::LocationMode | locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE ) |
Open a file.
[out] | btrieveFile | The Btrieve file. |
[in] | fileName | The file name. |
[in] | ownerName | The owner name. |
[in] | openMode | The open mode. |
[in] | locationMode | The location mode. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileOpen | ( | BtrieveFile * | btrieveFile, |
const wchar_t * | fileName, | ||
const char * | ownerName, | ||
Btrieve::OpenMode | openMode, | ||
Btrieve::LocationMode | locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE ) |
Open a file.
[out] | btrieveFile | The Btrieve file. |
[in] | fileName | The file name. |
[in] | ownerName | The owner name. |
[in] | openMode | The open mode. |
[in] | locationMode | The location mode. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileRename | ( | const char * | existingFileName, |
const char * | newFileName ) |
Rename a file.
[in] | existingFileName | The existing file name. |
[in] | newFileName | The new file name. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::FileRename | ( | const wchar_t * | existingFileName, |
const wchar_t * | newFileName ) |
Rename a file.
[in] | existingFileName | The existing file name. |
[in] | newFileName | The new file name. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
int BtrieveClient::GetClientIdentifier | ( | ) |
Get the client identifier.
>= 0 | The client identifier. |
-1 | An error has occurred. Use BtrieveClient::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
const char * BtrieveClient::GetCurrentDirectory | ( | Btrieve::DiskDrive | diskDrive | ) |
Get the current directory.
[in] | diskDrive | The disk drive. Non-Windows based systems must use DISK_DRIVE_DEFAULT. |
!= NULL | The current directory. |
NULL | An error has occurred. Use BtrieveClient::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
Btrieve::StatusCode BtrieveClient::GetCurrentDirectory | ( | Btrieve::DiskDrive | diskDrive, |
char * | currentDirectory, | ||
int | currentDirectorySize ) |
Get the current directory.
[in] | diskDrive | The disk drive. Non-Windows based systems must use DISK_DRIVE_DEFAULT. |
[out] | currentDirectory | The current directory. |
[in] | currentDirectorySize | The current directory size. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::GetCurrentDirectory | ( | Btrieve::DiskDrive | diskDrive, |
wchar_t * | currentDirectory, | ||
int | currentDirectorySize ) |
Get the current directory.
[in] | diskDrive | The disk drive. Non-Windows based systems must use DISK_DRIVE_DEFAULT. |
[out] | currentDirectory | The current directory. |
[in] | currentDirectorySize | The current directory size. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::GetLastStatusCode | ( | ) |
Get the last status code.
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
int BtrieveClient::GetServiceAgentIdentifier | ( | ) |
Get the service agent identifier.
>= 0 | The service agent identifier. |
-1 | An error has occurred. Use BtrieveClient::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
Btrieve::StatusCode BtrieveClient::GetVersion | ( | BtrieveVersion * | btrieveVersion, |
BtrieveFile * | btrieveFile = NULL ) |
Get the version.
[out] | btrieveVersion | The version. |
[in] | btrieveFile | The Btrieve file. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::Login | ( | const char * | databaseURI | ) |
Login.
[in] | databaseURI | The database uniform resource indicator. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::Login | ( | const wchar_t * | databaseURI | ) |
Login.
[in] | databaseURI | The database uniform resource indicator. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::Logout | ( | const char * | databaseURI | ) |
Logout.
[in] | databaseURI | The database uniform resource indicator. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::Logout | ( | const wchar_t * | databaseURI | ) |
Logout.
[in] | databaseURI | The database uniform resource indicator. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::Reset | ( | ) |
Reset.
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::SetCurrentDirectory | ( | const char * | currentDirectory | ) |
Set the current directory.
[in] | currentDirectory | The current directory. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::SetCurrentDirectory | ( | const wchar_t * | currentDirectory | ) |
Set the current directory.
[in] | currentDirectory | The current directory. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::Stop | ( | ) |
Stop.
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::TransactionAbort | ( | ) |
Abort a transaction.
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::TransactionBegin | ( | Btrieve::TransactionMode | transactionMode, |
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE ) |
Begin a transaction.
[in] | transactionMode | The transaction mode. |
[in] | lockMode | The lock mode. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveClient::TransactionEnd | ( | ) |
End a transaction.
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |