switch to new MPL based Fraunhofer FOKUS Public License
[senf.git] / senf / Utils / Beeper.hh
index 7a29d60..516c337 100644 (file)
@@ -2,23 +2,28 @@
 //
 // Copyright (C) 2010
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
-// Competence Center NETwork research (NET), St. Augustin, GERMANY
-//     Thorsten Horstmann <tho@berlios.de>
 //
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
+// The contents of this file are subject to the Fraunhofer FOKUS Public License
+// Version 1.0 (the "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at 
+// http://senf.berlios.de/license.html
 //
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// The Fraunhofer FOKUS Public License Version 1.0 is based on, 
+// but modifies the Mozilla Public License Version 1.1.
+// See the full license text for the amendments.
 //
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the
-// Free Software Foundation, Inc.,
-// 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+// Software distributed under the License is distributed on an "AS IS" basis, 
+// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
+// for the specific language governing rights and limitations under the License.
+//
+// The Original Code is Fraunhofer FOKUS code.
+//
+// The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. 
+// (registered association), Hansastraße 27 c, 80686 Munich, Germany.
+// All Rights Reserved.
+//
+// Contributor(s):
+//   Thorsten Horstmann <tho@berlios.de>
 
 /** \file
     \brief Beeper public header */
@@ -30,7 +35,7 @@
 #include <string>
 #include <senf/Scheduler/TimerEvent.hh>
 
-///////////////////////////////hh.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
 namespace senf {
 
@@ -54,20 +59,24 @@ namespace senf {
 
         void beep_sync(float freq, unsigned length, unsigned count = 1, unsigned delay = 100);
                                         ///< play beep synchronous
-                                        /**< \param freq frequency in Hz, where 0 <freqN < 20000.
+                                        /**< \param freq frequency in Hz, where 0 < \e freq < 20000.
                                                  The regular terminal beep is around 750Hz.
                                              \param length duration in milliseconds.
                                              \param count number of repetitions (defaults to 1).
                                              \param delay delay between repetitions in milliseconds. */
         void beep_async(float freq, unsigned length, unsigned count = 1, unsigned delay = 100);
                                         ///< play beep asynchronous
-                                        /**< \param freq frequency in Hz, where 0 <freqN < 20000.
+                                        /**< \param freq frequency in Hz, where 0 < \e freq < 20000.
                                                  The regular terminal beep is around 750Hz.
                                              \param length duration in milliseconds.
                                              \param count number of repetitions (defaults to 1).
                                              \param delay delay between repetitions in milliseconds. */
 
         void stop_beep();               ///< stop playing.
+        bool start_beep(float freq);    ///< start playing.
+                                        /**< start playing until any other member is called.
+                                             \param freq frequency in Hz, where 0 < \e freq < 20000.
+                                             \returns \a true on success.*/
 
     private:
         static const unsigned CLOCK_TICK_RATE = 1193180;
@@ -85,14 +94,13 @@ namespace senf {
         } params_;
 #endif
 
-        bool start_beep(float freq);
         void timeout();
     };
 
 }
 
-///////////////////////////////hh.e////////////////////////////////////////
-//#include "Beeper.cci"
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
+#include "Beeper.cci"
 //#include "Beeper.ct"
 //#include "Beeper.cti"
 #endif