xref: /haiku/headers/os/media/MediaFiles.h (revision d5cd5d63ff0ad395989db6cf4841a64d5b545d1d)
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 virtual		status_t SetRefFor(
35 				const char * type,
36 				const char * item,
37 				const entry_ref & ref);
38 virtual		status_t RemoveRefFor(		//	This might better be called "ClearRefFor"
39 				const char * type,		//	but it's too late now...
40 				const char * item,
41 				const entry_ref & ref);
42 
43 static const char B_SOUNDS[];	/* for "types" */
44 
45 virtual		status_t RemoveItem(		//	new in 4.1, removes the whole item.
46 				const char * type,
47 				const char * item);
48 
49 
50 private:
51 
52 			status_t _Reserved_MediaFiles_0(void *, ...);
53 virtual		status_t _Reserved_MediaFiles_1(void *, ...);
54 virtual		status_t _Reserved_MediaFiles_2(void *, ...);
55 virtual		status_t _Reserved_MediaFiles_3(void *, ...);
56 virtual		status_t _Reserved_MediaFiles_4(void *, ...);
57 virtual		status_t _Reserved_MediaFiles_5(void *, ...);
58 virtual		status_t _Reserved_MediaFiles_6(void *, ...);
59 virtual		status_t _Reserved_MediaFiles_7(void *, ...);
60 
61 		BList m_types;
62 		int m_type_index;
63 		BString m_cur_type;
64 		BList m_items;
65 		int m_item_index;
66 };
67 
68 #endif /* _MEDIA_FILES_H */
69 
70