/*
 *   MediaMVP Plugin
 *
 *   (C) 2003 Dominic Morris
 *
 *   $Id: vdrrecurl.h,v 1.5 2004/10/24 11:39:03 dom Exp $
 *   $Date: 2004/10/24 11:39:03 $
 *
 *
 *   Handle the vdr:// URL type
 */


#ifndef VDRRECURL_H
#define VDRRECURL_H

class cMediamvpVdrRecURL  {
private:
    int                   fd; /* Current file being read */
    int                   curfile; /* Current file */
    char                 *name;
    astrip_t              strip;
    char                  filename[FILENAME_MAX+1];  /* Directory where file is */  
    void OpenFile();

public:
    cMediamvpVdrRecURL();
    ~cMediamvpVdrRecURL();
    static void Init();
    static void *sOpen(char *name, int *type, fops_t **fops, readready_cb cb, void *cb_ptr);
    static off_t sSeek(void *ptr, off_t offset, int whence);
    static void sClose(void *ptr);
    static int sRead(void *ptr, unsigned char *buf, size_t buflen);
    static int sInfo(void *ptr, int cmd, void *args);
    int GopSeek(gopseek_t *gop);
    off_t Seek(off_t offset, int whence);
    size_t Read(unsigned char *buf, size_t buflen);
    off_t CurrentOffset();

};

#endif
