1 /* 2 * Copyright (c) 2002, Jerome Duval (jerome.duval@free.fr) 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #ifndef _MULTIAUDIOADDON_H 7 #define _MULTIAUDIOADDON_H 8 9 #include <MediaDefs.h> 10 #include <MediaAddOn.h> 11 12 #define SETTINGS_FILE "Media/multi_audio_settings" 13 14 class MultiAudioAddOn : 15 public BMediaAddOn 16 { 17 public: 18 virtual ~MultiAudioAddOn(void); 19 explicit MultiAudioAddOn(image_id image); 20 21 /**************************/ 22 /* begin from BMediaAddOn */ 23 public: 24 virtual status_t InitCheck( 25 const char ** out_failure_text); 26 virtual int32 CountFlavors(void); 27 virtual status_t GetFlavorAt( 28 int32 n, 29 const flavor_info ** out_info); 30 virtual BMediaNode * InstantiateNodeFor( 31 const flavor_info * info, 32 BMessage * config, 33 status_t * out_error); 34 virtual status_t GetConfigurationFor( 35 BMediaNode * your_node, 36 BMessage * into_message); 37 virtual bool WantsAutoStart(void); 38 virtual status_t AutoStart( 39 int in_count, 40 BMediaNode ** out_node, 41 int32 * out_internal_id, 42 bool * out_has_more); 43 44 /* end from BMediaAddOn */ 45 /************************/ 46 47 private: 48 status_t RecursiveScan(char* path, BEntry *rootEntry = NULL); 49 void SaveSettings(); 50 void LoadSettings(); 51 52 status_t fInitCheckStatus; 53 BList fDevices; 54 55 BMessage fSettings; // settings loaded from settings directory 56 }; 57 58 extern "C" _EXPORT BMediaAddOn *make_media_addon(image_id you); 59 60 #endif /* _MULTIAUDIOADDON_H */ 61