xref: /haiku/headers/os/media/MediaFiles.h (revision 1e36cfc2721ef13a187c6f7354dc9cbc485e89d3)
1 /*	MediaFiles.h	*/
2 /*	Copyright 1998 Be Incorporated. All rights reserved.	*/
3 
4 #if !defined(_MEDIA_FILES_H)
5 #define _MEDIA_FILES_H
6 
7 #include <MediaDefs.h>
8 #include <List.h>
9 
10 struct entry_ref;
11 
12 #include <String.h>
13 
14 class BMediaFiles {
15 public:
16 
17 		BMediaFiles();
18 virtual		~BMediaFiles();
19 
20 virtual		status_t RewindTypes();
21 virtual		status_t GetNextType(
22 				BString * out_type);
23 
24 virtual		status_t RewindRefs(
25 				const char * type);
26 virtual		status_t GetNextRef(
27 				BString * out_type,
28 				entry_ref * out_ref = NULL);
29 
30 virtual		status_t GetRefFor(
31 				const char * type,
32 				const char * item,
33 				entry_ref * out_ref);
34 			status_t GetAudioGainFor(
35 				const char * type,
36 				const char * item,
37 				float * out_audio_gain);
38 virtual		status_t SetRefFor(
39 				const char * type,
40 				const char * item,
41 				const entry_ref & ref);
42 			status_t SetAudioGainFor(
43 				const char * type,
44 				const char * item,
45 				float audio_gain);
46 virtual		status_t RemoveRefFor(		//	This might better be called "ClearRefFor"
47 				const char * type,		//	but it's too late now...
48 				const char * item,
49 				const entry_ref & ref);
50 
51 static const char B_SOUNDS[];	/* for "types" */
52 
53 virtual		status_t RemoveItem(		//	new in 4.1, removes the whole item.
54 				const char * type,
55 				const char * item);
56 
57 
58 private:
59 
60 			status_t _Reserved_MediaFiles_0(void *, ...);
61 virtual		status_t _Reserved_MediaFiles_1(void *, ...);
62 virtual		status_t _Reserved_MediaFiles_2(void *, ...);
63 virtual		status_t _Reserved_MediaFiles_3(void *, ...);
64 virtual		status_t _Reserved_MediaFiles_4(void *, ...);
65 virtual		status_t _Reserved_MediaFiles_5(void *, ...);
66 virtual		status_t _Reserved_MediaFiles_6(void *, ...);
67 virtual		status_t _Reserved_MediaFiles_7(void *, ...);
68 
69 		BList m_types;
70 		int m_type_index;
71 		BString m_cur_type;
72 		BList m_items;
73 		int m_item_index;
74 };
75 
76 #endif /* _MEDIA_FILES_H */
77 
78