1 #ifndef _Jafsadm_Internal
2 #define _Jafsadm_Internal
5 #include "Exceptions.h"
9 #include <afs_kasAdmin.h>
12 #define JAFSADMNOMEM 1050 // Memory problems
13 #define JAFSADMCLASSNOTFOUND 1051 // Trouble finding a Java class
14 #define JAFSADMMETHODNOTFOUND 1052 // Trouble finding a Java method
15 #define JAFSADMFIELDNOTFOUND 1053 // Trouble finding a Java field
17 // make an identity out of a full name (possibly including an instance )
18 void internal_makeKasIdentity( const char *fullName
, kas_identity_p who
);
20 void internal_getUserClass( JNIEnv
*env
, jobject user
);
21 void internal_getGroupClass( JNIEnv
*env
, jobject group
);
22 void internal_getServerClass( JNIEnv
*env
, jobject server
);
23 void internal_getPartitionClass( JNIEnv
*env
, jobject partition
);
24 void internal_getVolumeClass( JNIEnv
*env
, jobject volume
);
25 void internal_getKeyClass( JNIEnv
*env
, jobject key
);
26 void internal_getProcessClass( JNIEnv
*env
, jobject process
);
28 int openAFSFile(JNIEnv
*env
, jstring fileNameUTF
, int flags
, int mode
, int *err
);
29 int readCacheParms(char *afsMountPoint
, char *afsConfDir
, char *afsCacheDir
,
30 int *cacheBlocks
, int *cacheFiles
, int *cacheStatEntries
,
31 int *dCacheSize
, int *vCacheSize
, int *chunkSize
,
32 int *closeSynch
, int *debug
, int *nDaemons
, int *cacheFlags
,
34 #endif /* !LIBJUAFS */
36 // throw a non-AFS exception with a message
37 void throwMessageException( JNIEnv
*env
, char *msg
);
39 // throw an AFS exception with a message
40 void throwAFSException( JNIEnv
*env
, int code
);
42 // throw an AFS Admin exception with a message
43 void throwAFSException( JNIEnv
*env
, int code
);
45 // throw an AFS File or I/O related exception with a message
46 void throwFileAdminException( JNIEnv
*env
, int code
, char *msg
);
48 // throw an AFS Security exception with a message
49 void throwAFSSecurityException( JNIEnv
*env
, int code
);
51 // throw an exception with an error code
52 void throwException( JNIEnv
*env
, jclass
*excCls
, char *excClsName
, jmethodID
*initID
, int code
);
54 // reclaim global memory used by exceptions
55 void reclaimExceptionMemory( JNIEnv
*env
, jclass cls
);
57 int setError(JNIEnv
*env
, jobject
*obj
, int code
);
58 int setString(JNIEnv
*env
, jobject
*obj
, char *field
, char *string
);