xref: /haiku/headers/os/media/FileInterface.h (revision e221c09e508ffc3c62738140c9b6fc4fa211662a)
1 /*******************************************************************************
2 /
3 /	File:			FileInterface.h
4 /
5 /   Description:  A BFileInterface is something which can read and/or write files for the
6 /	use of other Media Kit participants.
7 /
8 /	Copyright 1997-98, Be Incorporated, All Rights Reserved
9 /
10 *******************************************************************************/
11 
12 #if !defined(_FILE_INTERFACE_H)
13 #define _FILE_INTERFACE_H
14 
15 #include <MediaDefs.h>
16 #include <MediaNode.h>
17 
18 struct entry_ref;
19 
20 
21 class BFileInterface :
22 	public virtual BMediaNode
23 {
24 protected:
25 
26 virtual	~BFileInterface();	/* force vtable */
27 
28 public:
29 
30 		/* look, no hands! */
31 
32 protected:
33 
34 		BFileInterface();
35 virtual	status_t HandleMessage(
36 				int32 message,
37 				const void * data,
38 				size_t size);
39 
40 virtual	status_t GetNextFileFormat(
41 				int32 * cookie,
42 				media_file_format * out_format) = 0;
43 virtual	void DisposeFileFormatCookie(
44 				int32 cookie) = 0;
45 
46 virtual	status_t GetDuration(
47 				bigtime_t * out_time) = 0;
48 virtual	status_t SniffRef(
49 				const entry_ref & file,
50 				char * out_mime_type,	/* 256 bytes */
51 				float * out_quality) = 0;
52 virtual	status_t SetRef(
53 				const entry_ref & file,
54 				bool create,
55 				bigtime_t * out_time) = 0;
56 virtual	status_t GetRef(
57 				entry_ref * out_ref,
58 				char * out_mime_type) = 0;
59 
60 private:
61 
62 	friend class BMediaNode;
63 
64 		BFileInterface(	/* private unimplemented */
65 				const BFileInterface & clone);
66 		BFileInterface & operator=(
67 				const BFileInterface & clone);
68 
69 		/* Mmmh, stuffing! */
70 virtual		status_t _Reserved_FileInterface_0(void *);
71 virtual		status_t _Reserved_FileInterface_1(void *);
72 virtual		status_t _Reserved_FileInterface_2(void *);
73 virtual		status_t _Reserved_FileInterface_3(void *);
74 virtual		status_t _Reserved_FileInterface_4(void *);
75 virtual		status_t _Reserved_FileInterface_5(void *);
76 virtual		status_t _Reserved_FileInterface_6(void *);
77 virtual		status_t _Reserved_FileInterface_7(void *);
78 virtual		status_t _Reserved_FileInterface_8(void *);
79 virtual		status_t _Reserved_FileInterface_9(void *);
80 virtual		status_t _Reserved_FileInterface_10(void *);
81 virtual		status_t _Reserved_FileInterface_11(void *);
82 virtual		status_t _Reserved_FileInterface_12(void *);
83 virtual		status_t _Reserved_FileInterface_13(void *);
84 virtual		status_t _Reserved_FileInterface_14(void *);
85 virtual		status_t _Reserved_FileInterface_15(void *);
86 
87 		uint32 _reserved_file_interface_[16];
88 
89 };
90 
91 
92 #endif /* _FILE_INTERFACE_H */
93 
94