yast2-sound

YastChannelId.h

Go to the documentation of this file.
00001 /* ------------------------------------------------------------------------------
00002  * Copyright (c) 2009 Novell, Inc. All Rights Reserved.
00003  *
00004  *
00005  * This program is free software; you can redistribute it and/or modify it under
00006  * the terms of version 2 of the GNU General Public License as published by the
00007  * Free Software Foundation.
00008  *
00009  * This program is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License along with
00014  * this program; if not, contact Novell, Inc.
00015  *
00016  * To contact Novell about this file by physical or electronic mail, you may find
00017  * current contact information at www.novell.com.
00018  * ------------------------------------------------------------------------------
00019  */
00020 
00021 /*
00022    File:        $Id: YastChannelId.h 57029 2009-04-29 11:04:19Z lslezak $
00023    Author:      Ladislav Slezák <lslezak@novell.com>
00024    Summary:     Class for converting Alsa channel name to Yast channel ID and vice versea.
00025 */
00026 
00027 #include <string>
00028 
00029 class YastChannelId
00030 {
00031     public:
00032 
00033         YastChannelId() : channel_name(), channel_index(0) {}
00034         YastChannelId(const char* alsa_name, unsigned alsa_index) : channel_name(alsa_name), channel_index(alsa_index) {}
00035         YastChannelId(const std::string &YastID);
00036 
00037         std::string name() {return channel_name;}
00038         unsigned index() {return channel_index;}
00039 
00040         std::string asString();
00041 
00042     private:
00043 
00044         std::string channel_name;
00045         unsigned channel_index;
00046 };
00047 

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