1/*
2 * Copyright 2009, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _FILE_INTERFACE_H
6#define _FILE_INTERFACE_H
7
8
9#include <MediaNode.h>
10
11
12struct entry_ref;
13
14
15class BFileInterface : public virtual BMediaNode {
16protected:
17	virtual						~BFileInterface();
18
19protected:
20								BFileInterface();
21
22	virtual	status_t			HandleMessage(int32 message, const void* data,
23									size_t size);
24
25	virtual	status_t			GetNextFileFormat(int32* cookie,
26									media_file_format* _format) = 0;
27	virtual	void				DisposeFileFormatCookie(int32 cookie) = 0;
28
29	virtual	status_t			GetDuration(bigtime_t* _time) = 0;
30	virtual	status_t			SniffRef(const entry_ref& file,
31									char* _mimeType, // 256 bytes
32									float* _quality) = 0;
33	virtual	status_t			SetRef(const entry_ref& file,
34									bool create, bigtime_t* _time) = 0;
35	virtual	status_t			GetRef(entry_ref* _ref, char* _mimeType) = 0;
36
37	// TODO: Needs a Perform() virtual method!
38
39private:
40	// FBC padding and forbidden methods
41	friend class BMediaNode;
42
43								BFileInterface(const BFileInterface& other);
44			BFileInterface&		operator=(const BFileInterface& other);
45
46	virtual	status_t			_Reserved_FileInterface_0(void*);
47	virtual	status_t			_Reserved_FileInterface_1(void*);
48	virtual	status_t			_Reserved_FileInterface_2(void*);
49	virtual	status_t			_Reserved_FileInterface_3(void*);
50	virtual	status_t			_Reserved_FileInterface_4(void*);
51	virtual	status_t			_Reserved_FileInterface_5(void*);
52	virtual	status_t			_Reserved_FileInterface_6(void*);
53	virtual	status_t			_Reserved_FileInterface_7(void*);
54	virtual	status_t			_Reserved_FileInterface_8(void*);
55	virtual	status_t			_Reserved_FileInterface_9(void*);
56	virtual	status_t			_Reserved_FileInterface_10(void*);
57	virtual	status_t			_Reserved_FileInterface_11(void*);
58	virtual	status_t			_Reserved_FileInterface_12(void*);
59	virtual	status_t			_Reserved_FileInterface_13(void*);
60	virtual	status_t			_Reserved_FileInterface_14(void*);
61	virtual	status_t			_Reserved_FileInterface_15(void*);
62
63			uint32				_reserved_file_interface_[16];
64};
65
66#endif // _FILE_INTERFACE_H
67
68