xref: /haiku/src/add-ons/media/media-add-ons/multi_audio/MultiAudioAddOn.h (revision eddec292d5dd8251a00851880e16e6a5c07c1e3f)
1 /*
2  * Copyright (c) 2002, Jerome Duval (jerome.duval@free.fr)
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef MULTI_AUDIO_ADDON_H
6 #define MULTI_AUDIO_ADDON_H
7 
8 
9 #include <MediaDefs.h>
10 #include <MediaAddOn.h>
11 #include <Message.h>
12 
13 class BEntry;
14 
15 
16 class MultiAudioAddOn : public BMediaAddOn {
17 public:
18 						MultiAudioAddOn(image_id image);
19 	virtual				~MultiAudioAddOn();
20 
21 	virtual	status_t	InitCheck(const char** _failureText);
22 	virtual	int32		CountFlavors();
23 	virtual	status_t	GetFlavorAt(int32 i, const flavor_info** _info);
24 	virtual	BMediaNode*	InstantiateNodeFor(const flavor_info* info,
25 							BMessage* config, status_t* _error);
26 	virtual	status_t	GetConfigurationFor(BMediaNode* node,
27 							BMessage* message);
28 	virtual	bool		WantsAutoStart();
29 	virtual	status_t	AutoStart(int count, BMediaNode** _node,
30 							int32* _internalID, bool* _hasMore);
31 
32 private:
33 			status_t	_RecursiveScan(const char* path, BEntry* rootEntry = NULL,
34 							uint32 depth = 0);
35 			void		_SaveSettings();
36 			void		_LoadSettings();
37 
38 private:
39 	status_t 		fInitStatus;
40 	BList			fDevices;
41 
42 	BMessage		fSettings;
43 		// loaded from settings directory
44 };
45 
46 extern "C" BMediaAddOn* make_media_addon(image_id you);
47 
48 #endif	// MULTI_AUDIO_ADDON_H
49