vdr
2.0.4
Main Page
Namespaces
Classes
Files
File List
File Members
videodir.h
Go to the documentation of this file.
1
/*
2
* videodir.h: Functions to maintain a distributed video directory
3
*
4
* See the main source file 'vdr.c' for copyright information and
5
* how to reach the author.
6
*
7
* $Id: videodir.h 2.3 2012/09/30 11:01:15 kls Exp $
8
*/
9
10
#ifndef __VIDEODIR_H
11
#define __VIDEODIR_H
12
13
#include <stdlib.h>
14
#include "
tools.h
"
15
16
extern
const
char
*
VideoDirectory
;
17
18
void
SetVideoDirectory
(
const
char
*Directory);
19
cUnbufferedFile
*
OpenVideoFile
(
const
char
*FileName,
int
Flags);
20
int
CloseVideoFile
(
cUnbufferedFile
*File);
21
bool
RenameVideoFile
(
const
char
*OldName,
const
char
*NewName);
22
bool
RemoveVideoFile
(
const
char
*FileName);
23
bool
VideoFileSpaceAvailable
(
int
SizeMB);
24
int
VideoDiskSpace
(
int
*FreeMB = NULL,
int
*UsedMB = NULL);
// returns the used disk space in percent
25
cString
PrefixVideoFileName
(
const
char
*FileName,
char
Prefix);
26
cString
NewVideoFileName
(
const
char
*FileName,
const
char
*NewDirName);
27
void
RemoveEmptyVideoDirectories
(
const
char
*IgnoreFiles[] = NULL);
28
bool
IsOnVideoDirectoryFileSystem
(
const
char
*FileName);
29
30
class
cVideoDiskUsage
{
31
private
:
32
static
int
state
;
33
static
time_t
lastChecked
;
34
static
int
usedPercent
;
35
static
int
freeMB
;
36
static
int
freeMinutes
;
37
public
:
38
static
bool
HasChanged
(
int
&State);
44
static
void
ForceCheck
(
void
) {
lastChecked
= 0; }
49
static
cString
String
(
void
);
55
static
int
UsedPercent
(
void
) {
return
usedPercent
; }
58
static
int
FreeMB
(
void
) {
return
freeMB
; }
61
static
int
FreeMinutes
(
void
) {
return
freeMinutes
; }
66
};
67
68
#endif //__VIDEODIR_H
69
Generated by
1.8.3.1