/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include <jni.h>
#include <jni_util.h>
#include <jvm_md.h>
#include <dlfcn.h>
//#define CUPS_DEBUG
#ifdef CUPS_DEBUG
#else
#define DPRINTF(x, y)
#endif
typedef const char* (*fn_cupsServer)(void);
typedef int (*fn_ippPort)(void);
typedef char* (*fn_cupsGetPPD)(const char *);
/*
* Initialize library functions.
* // REMIND : move tab , add dlClose before return
*/
RTLD_LAZY | RTLD_GLOBAL);
return JNI_FALSE;
}
}
if (j2d_cupsServer == NULL) {
return JNI_FALSE;
}
if (j2d_ippPort == NULL) {
return JNI_FALSE;
}
if (j2d_httpConnect == NULL) {
return JNI_FALSE;
}
if (j2d_httpClose == NULL) {
return JNI_FALSE;
}
if (j2d_cupsGetPPD == NULL) {
return JNI_FALSE;
}
if (j2d_ppdOpenFile == NULL) {
return JNI_FALSE;
}
if (j2d_ppdClose == NULL) {
return JNI_FALSE;
}
if (j2d_ppdFindOption == NULL) {
return JNI_FALSE;
}
if (j2d_ppdPageSize == NULL) {
return JNI_FALSE;
}
return JNI_TRUE;
}
/*
* Gets CUPS server name.
*
*/
{
// Is this a local domain socket?
} else {
}
}
return cServer;
}
/*
* Gets CUPS port name.
*
*/
{
}
/*
* Checks if connection can be made to the server.
*
*/
{
const char *serverName;
if (serverName != NULL) {
return JNI_TRUE;
}
}
return JNI_FALSE;
}
/*
* Returns list of media: pages + trays
*/
{
const char *name;
const char *filename;
return NULL;
}
// NOTE: cupsGetPPD returns a pointer to a filename of a temporary file.
// unlink() must be caled to remove the file when finished using it.
return NULL;
}
return NULL;
}
if (optionPage != NULL) {
}
if (optionTray != NULL) {
}
return NULL;
}
return NULL;
}
return NULL;
}
}
return NULL;
}
return NULL;
}
}
}
return nameArray;
}
/*
* Returns list of page sizes and imageable area.
*/
{
const char *filename;
int i;
// NOTE: cupsGetPPD returns a pointer to a filename of a temporary file.
// unlink() must be called to remove the file after using it.
return NULL;
}
return NULL;
}
// create array of dimensions - (num_choices * 6)
//to cover length & height
return NULL;
}
for (i = 0; i<option->num_choices; i++) {
// paper width and height
// paper printable area
}
}
}
return sizeArray;
}