Added documentation for the Db class.

git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@776 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
dsandersoremutah
2006-08-18 21:19:30 +00:00
parent d2d8ab50f3
commit ab9fa2acdd
8 changed files with 1724 additions and 1014 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -50,3 +50,85 @@ void ThrowError(
pEnv->Throw( reinterpret_cast<jthrowable>(Exception));
}
/****************************************************************************
Desc:
****************************************************************************/
RCODE getUniString(
JNIEnv * pEnv,
jstring sStr,
F_DynaBuf * pDynaBuf)
{
RCODE rc = NE_XFLM_OK;
const FLMUNICODE * puzStr = NULL;
FLMUINT uiStrCharCount;
if (sStr)
{
puzStr = (const FLMUNICODE *)pEnv->GetStringChars( sStr, NULL);
uiStrCharCount = (FLMUINT)pEnv->GetStringLength( sStr);
if (RC_BAD( rc = pDynaBuf->appendData( puzStr,
sizeof( FLMUNICODE) * uiStrCharCount)))
{
goto Exit;
}
if (RC_BAD( rc = pDynaBuf->appendUniChar( 0)))
{
goto Exit;
}
}
else
{
pDynaBuf->truncateData( 0);
}
Exit:
if (puzStr)
{
pEnv->ReleaseStringChars( sStr, puzStr);
}
return( rc);
}
/****************************************************************************
Desc:
****************************************************************************/
RCODE getUTF8String(
JNIEnv * pEnv,
jstring sStr,
F_DynaBuf * pDynaBuf)
{
RCODE rc = NE_XFLM_OK;
const char * pszStr = NULL;
FLMUINT uiStrCharCount;
if (sStr)
{
pszStr = pEnv->GetStringUTFChars( sStr, NULL);
uiStrCharCount = (FLMUINT)pEnv->GetStringUTFLength( sStr);
if (RC_BAD( rc = pDynaBuf->appendData( pszStr, uiStrCharCount)))
{
goto Exit;
}
}
else
{
pDynaBuf->truncateData( 0);
}
if (RC_BAD( rc = pDynaBuf->appendByte( 0)))
{
goto Exit;
}
Exit:
if (pszStr)
{
pEnv->ReleaseStringUTFChars( sStr, pszStr);
}
return( rc);
}

View File

@@ -7,126 +7,6 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: xflaim_Db
* Method: _dbLock
* Signature: (JIII)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1dbLock
(JNIEnv *, jobject, jlong, jint, jint, jint);
/*
* Class: xflaim_Db
* Method: _dbUnlock
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1dbUnlock
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _getLockType
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getLockType
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _getLockImplicit
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_xflaim_Db__1getLockImplicit
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _getLockThreadId
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getLockThreadId
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _getLockNumExclQueued
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getLockNumExclQueued
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _getLockNumSharedQueued
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getLockNumSharedQueued
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _getLockPriorityCount
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getLockPriorityCount
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _indexSuspend
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1indexSuspend
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _indexResume
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1indexResume
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _indexGetNext
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1indexGetNext
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _indexStatus
* Signature: (JI)Lxflaim/IndexStatus;
*/
JNIEXPORT jobject JNICALL Java_xflaim_Db__1indexStatus
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _reduceSize
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1reduceSize
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _documentDone
* Signature: (JIJ)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1documentDone__JIJ
(JNIEnv *, jobject, jlong, jint, jlong);
/*
* Class: xflaim_Db
* Method: _documentDone
* Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1documentDone__JJ
(JNIEnv *, jobject, jlong, jlong);
/*
* Class: xflaim_Db
* Method: _release
@@ -185,11 +65,131 @@ JNIEXPORT void JNICALL Java_xflaim_Db__1doCheckpoint
/*
* Class: xflaim_Db
* Method: _import
* Signature: (JJIJI)Lxflaim/ImportStats;
* Method: _dbLock
* Signature: (JIII)V
*/
JNIEXPORT jobject JNICALL Java_xflaim_Db__1import
(JNIEnv *, jobject, jlong, jlong, jint, jlong, jint);
JNIEXPORT void JNICALL Java_xflaim_Db__1dbLock
(JNIEnv *, jobject, jlong, jint, jint, jint);
/*
* Class: xflaim_Db
* Method: _dbUnlock
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1dbUnlock
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _getLockType
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getLockType
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _getLockImplicit
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_xflaim_Db__1getLockImplicit
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _getLockThreadId
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getLockThreadId
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _getLockNumExclQueued
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getLockNumExclQueued
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _getLockNumSharedQueued
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getLockNumSharedQueued
(JNIEnv *, jobject, jlong);
/*
* Class: xflaim_Db
* Method: _getLockPriorityCount
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getLockPriorityCount
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _indexSuspend
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1indexSuspend
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _indexResume
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1indexResume
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _indexGetNext
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1indexGetNext
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _indexStatus
* Signature: (JI)Lxflaim/IndexStatus;
*/
JNIEXPORT jobject JNICALL Java_xflaim_Db__1indexStatus
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _reduceSize
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1reduceSize
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _keyRetrieve
* Signature: (JIJIJ)V
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1keyRetrieve
(JNIEnv *, jobject, jlong, jint, jlong, jint, jlong);
/*
* Class: xflaim_Db
* Method: _createDocument
* Signature: (JI)J
*/
JNIEXPORT jlong JNICALL Java_xflaim_Db__1createDocument
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _createRootElement
* Signature: (JII)J
*/
JNIEXPORT jlong JNICALL Java_xflaim_Db__1createRootElement
(JNIEnv *, jobject, jlong, jint, jint);
/*
* Class: xflaim_Db
@@ -217,35 +217,19 @@ JNIEXPORT jlong JNICALL Java_xflaim_Db__1getDocument
/*
* Class: xflaim_Db
* Method: _getNode
* Signature: (JIJJ)J
* Method: _documentDone
* Signature: (JIJ)V
*/
JNIEXPORT jlong JNICALL Java_xflaim_Db__1getNode
(JNIEnv *, jobject, jlong, jint, jlong, jlong);
JNIEXPORT void JNICALL Java_xflaim_Db__1documentDone__JIJ
(JNIEnv *, jobject, jlong, jint, jlong);
/*
* Class: xflaim_Db
* Method: _getAttribute
* Signature: (JIJIJ)J
* Method: _documentDone
* Signature: (JJ)V
*/
JNIEXPORT jlong JNICALL Java_xflaim_Db__1getAttribute
(JNIEnv *, jobject, jlong, jint, jlong, jint, jlong);
/*
* Class: xflaim_Db
* Method: _createDocument
* Signature: (JI)J
*/
JNIEXPORT jlong JNICALL Java_xflaim_Db__1createDocument
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _createRootElement
* Signature: (JII)J
*/
JNIEXPORT jlong JNICALL Java_xflaim_Db__1createRootElement
(JNIEnv *, jobject, jlong, jint, jint);
JNIEXPORT void JNICALL Java_xflaim_Db__1documentDone__JJ
(JNIEnv *, jobject, jlong, jlong);
/*
* Class: xflaim_Db
@@ -255,14 +239,6 @@ JNIEXPORT jlong JNICALL Java_xflaim_Db__1createRootElement
JNIEXPORT jint JNICALL Java_xflaim_Db__1createElementDef
(JNIEnv *, jobject, jlong, jstring, jstring, jint, jint);
/*
* Class: xflaim_Db
* Method: _getElementNameId
* Signature: (JLjava/lang/String;Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getElementNameId
(JNIEnv *, jobject, jlong, jstring, jstring);
/*
* Class: xflaim_Db
* Method: _createUniqueElmDef
@@ -271,6 +247,14 @@ JNIEXPORT jint JNICALL Java_xflaim_Db__1getElementNameId
JNIEXPORT jint JNICALL Java_xflaim_Db__1createUniqueElmDef
(JNIEnv *, jobject, jlong, jstring, jstring, jint);
/*
* Class: xflaim_Db
* Method: _getElementNameId
* Signature: (JLjava/lang/String;Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_xflaim_Db__1getElementNameId
(JNIEnv *, jobject, jlong, jstring, jstring);
/*
* Class: xflaim_Db
* Method: _createAttributeDef
@@ -375,6 +359,22 @@ JNIEXPORT jstring JNICALL Java_xflaim_Db__1getElementNamespace
JNIEXPORT jstring JNICALL Java_xflaim_Db__1getAttributeNamespace
(JNIEnv *, jobject, jlong, jint);
/*
* Class: xflaim_Db
* Method: _getNode
* Signature: (JIJJ)J
*/
JNIEXPORT jlong JNICALL Java_xflaim_Db__1getNode
(JNIEnv *, jobject, jlong, jint, jlong, jlong);
/*
* Class: xflaim_Db
* Method: _getAttribute
* Signature: (JIJIJ)J
*/
JNIEXPORT jlong JNICALL Java_xflaim_Db__1getAttribute
(JNIEnv *, jobject, jlong, jint, jlong, jint, jlong);
/*
* Class: xflaim_Db
* Method: _getDataType
@@ -393,11 +393,11 @@ JNIEXPORT jlong JNICALL Java_xflaim_Db__1backupBegin
/*
* Class: xflaim_Db
* Method: _keyRetrieve
* Signature: (JIJIJ)V
* Method: _import
* Signature: (JJIJI)Lxflaim/ImportStats;
*/
JNIEXPORT void JNICALL Java_xflaim_Db__1keyRetrieve
(JNIEnv *, jobject, jlong, jint, jlong, jint, jlong);
JNIEXPORT jobject JNICALL Java_xflaim_Db__1import
(JNIEnv *, jobject, jlong, jlong, jint, jlong, jint);
/*
* Class: xflaim_Db

View File

@@ -0,0 +1,25 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class xflaim_DictType */
#ifndef _Included_xflaim_DictType
#define _Included_xflaim_DictType
#ifdef __cplusplus
extern "C" {
#endif
#undef xflaim_DictType_ELEMENT_DEF
#define xflaim_DictType_ELEMENT_DEF 1L
#undef xflaim_DictType_ATTRIBUTE_DEF
#define xflaim_DictType_ATTRIBUTE_DEF 2L
#undef xflaim_DictType_PREFIX_DEF
#define xflaim_DictType_PREFIX_DEF 3L
#undef xflaim_DictType_ENCRYPTION_DEF
#define xflaim_DictType_ENCRYPTION_DEF 4L
#undef xflaim_DictType_COLLECTION_DEF
#define xflaim_DictType_COLLECTION_DEF 5L
#undef xflaim_DictType_INDEX_DEF
#define xflaim_DictType_INDEX_DEF 6L
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,19 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class xflaim_LockType */
#ifndef _Included_xflaim_LockType
#define _Included_xflaim_LockType
#ifdef __cplusplus
extern "C" {
#endif
#undef xflaim_LockType_FLM_LOCK_NONE
#define xflaim_LockType_FLM_LOCK_NONE 0L
#undef xflaim_LockType_FLM_LOCK_EXCLUSIVE
#define xflaim_LockType_FLM_LOCK_EXCLUSIVE 1L
#undef xflaim_LockType_FLM_LOCK_SHARED
#define xflaim_LockType_FLM_LOCK_SHARED 2L
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
//------------------------------------------------------------------------------
// Desc: Types of items in the dictionary.
//
// Tabs: 3
//
// Copyright (c) 2006 Novell, Inc. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the GNU General Public
// License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, contact Novell, Inc.
//
// To contact Novell about this file by physical or electronic mail,
// you may find current contact information at www.novell.com
//
// $Id$
//------------------------------------------------------------------------------
package xflaim;
/**
* Static class representing lock types.
*/
public class DictType
{
public static final int ELEMENT_DEF = 1;
public static final int ATTRIBUTE_DEF = 2;
public static final int PREFIX_DEF = 3;
public static final int ENCRYPTION_DEF = 4;
public static final int COLLECTION_DEF = 5;
public static final int INDEX_DEF = 6;
}

View File

@@ -0,0 +1,37 @@
//------------------------------------------------------------------------------
// Desc: Lock Types
//
// Tabs: 3
//
// Copyright (c) 2006 Novell, Inc. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the GNU General Public
// License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, contact Novell, Inc.
//
// To contact Novell about this file by physical or electronic mail,
// you may find current contact information at www.novell.com
//
// $Id$
//------------------------------------------------------------------------------
package xflaim;
/**
* Static class representing lock types.
*/
public class LockType
{
public static final int FLM_LOCK_NONE = 0;
public static final int FLM_LOCK_EXCLUSIVE = 1;
public static final int FLM_LOCK_SHARED = 2;
}