xref: /haiku/src/add-ons/media/media-add-ons/usb_vision/TunerLocale.h (revision 1214ef1b2100f2b3299fc9d8d6142e46f70a4c3f)
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 
14 namespace Locale{
15 
16 class Channel
17 {
18   string fName;
19   uint32 fFrequency;
20 public:
21   Channel(string &str, uint32 frequency);
22   const string &Name() const;
23   const uint32 Frequency();
24 };
25 
26 typedef vector<Channel> Channels;
27 typedef vector<Channel>::iterator ChannelsIterator;
28 
29 class TunerLocale
30 {
31   status_t fStatus;
32   string   fName;
33   Channels fChannels;
34   TunerLocale(BEntry &entry);
35   status_t LoadLocale(const char *file);
36 public:
37   ~TunerLocale();
38   static status_t LoadLocales(vector<TunerLocale *> &vector);
39   static status_t ReleaseLocales(vector<TunerLocale *> &vector);
40   status_t InitCheck();
41   const string &Name();
42   const Channel &GetChannel(int idx);
43   uint32 ChannelsCount();
44 };
45 
46 typedef vector<TunerLocale *> Locales;
47 typedef vector<TunerLocale *>::iterator LocalesIterator;
48 
49 } //namespace Locale
50 
51 #endif//_TUNER_LOCALE_H_
52