1*b2859abeSMarcus Overhagen /* 2*b2859abeSMarcus Overhagen * Copyright (c) 2004-2007 Marcus Overhagen <marcus@overhagen.de> 3*b2859abeSMarcus Overhagen * 4*b2859abeSMarcus Overhagen * Permission is hereby granted, free of charge, to any person 5*b2859abeSMarcus Overhagen * obtaining a copy of this software and associated documentation 6*b2859abeSMarcus Overhagen * files (the "Software"), to deal in the Software without restriction, 7*b2859abeSMarcus Overhagen * including without limitation the rights to use, copy, modify, 8*b2859abeSMarcus Overhagen * merge, publish, distribute, sublicense, and/or sell copies of 9*b2859abeSMarcus Overhagen * the Software, and to permit persons to whom the Software is 10*b2859abeSMarcus Overhagen * furnished to do so, subject to the following conditions: 11*b2859abeSMarcus Overhagen * 12*b2859abeSMarcus Overhagen * The above copyright notice and this permission notice shall be 13*b2859abeSMarcus Overhagen * included in all copies or substantial portions of the Software. 14*b2859abeSMarcus Overhagen * 15*b2859abeSMarcus Overhagen * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16*b2859abeSMarcus Overhagen * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17*b2859abeSMarcus Overhagen * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18*b2859abeSMarcus Overhagen * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19*b2859abeSMarcus Overhagen * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20*b2859abeSMarcus Overhagen * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21*b2859abeSMarcus Overhagen * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22*b2859abeSMarcus Overhagen * OTHER DEALINGS IN THE SOFTWARE. 23*b2859abeSMarcus Overhagen */ 24*b2859abeSMarcus Overhagen 25*b2859abeSMarcus Overhagen #ifndef _DVB_MEDIA_ADDON_H_ 26*b2859abeSMarcus Overhagen #define _DVB_MEDIA_ADDON_H_ 27*b2859abeSMarcus Overhagen 28*b2859abeSMarcus Overhagen #include <MediaAddOn.h> 29*b2859abeSMarcus Overhagen 30*b2859abeSMarcus Overhagen class DVBCard; 31*b2859abeSMarcus Overhagen 32*b2859abeSMarcus Overhagen class DVBMediaAddon : public BMediaAddOn 33*b2859abeSMarcus Overhagen { 34*b2859abeSMarcus Overhagen public: 35*b2859abeSMarcus Overhagen DVBMediaAddon(image_id id); 36*b2859abeSMarcus Overhagen ~DVBMediaAddon(); 37*b2859abeSMarcus Overhagen 38*b2859abeSMarcus Overhagen status_t InitCheck(const char **out_failure_text); 39*b2859abeSMarcus Overhagen 40*b2859abeSMarcus Overhagen int32 CountFlavors(); 41*b2859abeSMarcus Overhagen 42*b2859abeSMarcus Overhagen status_t GetFlavorAt(int32 n, const flavor_info **out_info); 43*b2859abeSMarcus Overhagen 44*b2859abeSMarcus Overhagen BMediaNode *InstantiateNodeFor(const flavor_info *info, BMessage *config, status_t *out_error); 45*b2859abeSMarcus Overhagen 46*b2859abeSMarcus Overhagen bool WantsAutoStart(); 47*b2859abeSMarcus Overhagen status_t AutoStart(int index, BMediaNode **outNode, int32 *outInternalID, bool *outHasMore); 48*b2859abeSMarcus Overhagen 49*b2859abeSMarcus Overhagen protected: 50*b2859abeSMarcus Overhagen void ScanFolder(const char *path); 51*b2859abeSMarcus Overhagen 52*b2859abeSMarcus Overhagen void AddDevice(DVBCard *card, const char *path); 53*b2859abeSMarcus Overhagen void FreeDeviceList(); 54*b2859abeSMarcus Overhagen 55*b2859abeSMarcus Overhagen protected: 56*b2859abeSMarcus Overhagen BList fDeviceList; 57*b2859abeSMarcus Overhagen }; 58*b2859abeSMarcus Overhagen 59*b2859abeSMarcus Overhagen #endif 60