1/* 2 * This file is a part of BeOS USBVision driver project. 3 * Copyright (c) 2003 by Siarzuk Zharski <imker@gmx.li> 4 * 5 * This file may be used under the terms of the BSD License 6 * 7 */ 8#ifndef _TUNER_LOCALE_H_ 9 #define _TUNER_LOCALE_H_ 10 11#include <string> 12#include <vector> 13#include <Entry.h> 14 15namespace Locale{ 16 17class Channel 18{ 19 string fName; 20 uint32 fFrequency; 21public: 22 Channel(string &str, uint32 frequency); 23 const string &Name() const; 24 const uint32 Frequency(); 25}; 26 27typedef vector<Channel> Channels; 28typedef vector<Channel>::iterator ChannelsIterator; 29 30class TunerLocale 31{ 32 status_t fStatus; 33 string fName; 34 Channels fChannels; 35 TunerLocale(BEntry &entry); 36 status_t LoadLocale(const char *file); 37public: 38 ~TunerLocale(); 39 static status_t LoadLocales(vector<TunerLocale *> &vector); 40 static status_t ReleaseLocales(vector<TunerLocale *> &vector); 41 status_t InitCheck(); 42 const string &Name(); 43 const Channel &GetChannel(int idx); 44 uint32 ChannelsCount(); 45}; 46 47typedef vector<TunerLocale *> Locales; 48typedef vector<TunerLocale *>::iterator LocalesIterator; 49 50} //namespace Locale 51 52#endif//_TUNER_LOCALE_H_ 53