Blame src/libbluray/bdj/bdj.h

Packit 5e46da
/*
Packit 5e46da
 * This file is part of libbluray
Packit 5e46da
 * Copyright (C) 2010  William Hahne
Packit 5e46da
 *
Packit 5e46da
 * This library is free software; you can redistribute it and/or
Packit 5e46da
 * modify it under the terms of the GNU Lesser General Public
Packit 5e46da
 * License as published by the Free Software Foundation; either
Packit 5e46da
 * version 2.1 of the License, or (at your option) any later version.
Packit 5e46da
 *
Packit 5e46da
 * This library is distributed in the hope that it will be useful,
Packit 5e46da
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 5e46da
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 5e46da
 * Lesser General Public License for more details.
Packit 5e46da
 *
Packit 5e46da
 * You should have received a copy of the GNU Lesser General Public
Packit 5e46da
 * License along with this library. If not, see
Packit 5e46da
 * <http://www.gnu.org/licenses/>.
Packit 5e46da
 */
Packit 5e46da
Packit 5e46da
#ifndef BDJ_H_
Packit 5e46da
#define BDJ_H_
Packit 5e46da
Packit 5e46da
#include "util/attributes.h"
Packit 5e46da
Packit 5e46da
#include <stdint.h>
Packit 5e46da
Packit 5e46da
typedef enum {
Packit 5e46da
    /* Note: these must be in sync with Libbluray.java ! */
Packit 5e46da
Packit 5e46da
    BDJ_EVENT_NONE             = 0,
Packit 5e46da
Packit 5e46da
    /* Application control */
Packit 5e46da
Packit 5e46da
    BDJ_EVENT_START            = 1, /* param: title number */
Packit 5e46da
    BDJ_EVENT_STOP             = 2,
Packit 5e46da
    BDJ_EVENT_PSR102           = 3,
Packit 5e46da
Packit 5e46da
    /* Playback status */
Packit 5e46da
Packit 5e46da
    BDJ_EVENT_PLAYLIST         = 4,
Packit 5e46da
    BDJ_EVENT_PLAYITEM         = 5,
Packit 5e46da
    BDJ_EVENT_CHAPTER          = 6,
Packit 5e46da
    BDJ_EVENT_MARK             = 7,
Packit 5e46da
    BDJ_EVENT_PTS              = 8,
Packit 5e46da
    BDJ_EVENT_END_OF_PLAYLIST  = 9,
Packit 5e46da
Packit 5e46da
    BDJ_EVENT_SEEK             = 10,
Packit 5e46da
    BDJ_EVENT_RATE             = 11,
Packit 5e46da
Packit 5e46da
    BDJ_EVENT_ANGLE            = 12,
Packit 5e46da
    BDJ_EVENT_AUDIO_STREAM     = 13,
Packit 5e46da
    BDJ_EVENT_SUBTITLE         = 14,
Packit 5e46da
    BDJ_EVENT_SECONDARY_STREAM = 15,
Packit 5e46da
Packit 5e46da
    /* User interaction */
Packit 5e46da
Packit 5e46da
    BDJ_EVENT_VK_KEY           = 16,
Packit 5e46da
    BDJ_EVENT_UO_MASKED        = 17,
Packit 5e46da
    BDJ_EVENT_MOUSE            = 18,
Packit 5e46da
Packit 5e46da
    BDJ_EVENT_LAST             = 18,
Packit 5e46da
Packit 5e46da
} BDJ_EVENT;
Packit 5e46da
Packit 5e46da
typedef struct {
Packit 5e46da
    char *persistent_root;   /* BD-J Xlet persistent storage */
Packit 5e46da
    char *cache_root;        /* BD-J binding unit data area */
Packit 5e46da
Packit 5e46da
    char *classpath;         /* BD-J implementation class path (location of libbluray.jar) */
Packit 5e46da
Packit 5e46da
    uint8_t no_persistent_storage; /* disable persistent storage (remove files at close) */
Packit 5e46da
} BDJ_STORAGE;
Packit 5e46da
Packit 5e46da
typedef struct bdjava_s BDJAVA;
Packit 5e46da
Packit 5e46da
struct bluray;
Packit 5e46da
Packit 5e46da
BD_PRIVATE BDJAVA* bdj_open(const char *path, struct bluray *bd,
Packit 5e46da
                            const char *bdj_disc_id, BDJ_STORAGE *storage);
Packit 5e46da
BD_PRIVATE void bdj_close(BDJAVA *bdjava);
Packit 5e46da
BD_PRIVATE int  bdj_process_event(BDJAVA *bdjava, unsigned ev, unsigned param);
Packit 5e46da
Packit 5e46da
BD_PRIVATE int  bdj_jvm_available(BDJ_STORAGE *storage); /* 0: no. 1: only jvm. 2: jvm + libbluray.jar. */
Packit 5e46da
Packit 5e46da
BD_PRIVATE void bdj_storage_cleanup(BDJ_STORAGE *);
Packit 5e46da
Packit 5e46da
#endif