yast2-sound
YastChannelId.h
Go to the documentation of this file.
1 /* ------------------------------------------------------------------------------
2  * Copyright (c) 2009 Novell, Inc. All Rights Reserved.
3  *
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of version 2 of the GNU General Public License as published by the
7  * Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along with
14  * this program; if not, contact Novell, Inc.
15  *
16  * To contact Novell about this file by physical or electronic mail, you may find
17  * current contact information at www.novell.com.
18  * ------------------------------------------------------------------------------
19  */
20 
21 /*
22  File: $Id: YastChannelId.h 57029 2009-04-29 11:04:19Z lslezak $
23  Author: Ladislav Slezák <lslezak@novell.com>
24  Summary: Class for converting Alsa channel name to Yast channel ID and vice versea.
25 */
26 
27 #include <string>
28 
30 {
31  public:
32 
34  YastChannelId(const char* alsa_name, unsigned alsa_index) : channel_name(alsa_name), channel_index(alsa_index) {}
35  YastChannelId(const std::string &YastID);
36 
37  std::string name() {return channel_name;}
38  unsigned index() {return channel_index;}
39 
40  std::string asString();
41 
42  private:
43 
44  std::string channel_name;
45  unsigned channel_index;
46 };
47 

Generated on a sunny day for yast2-sound by doxygen 1.8.2