From 4451b27c7a69b8ad8a35ceddf0305ce12b3aaf07 Mon Sep 17 00:00:00 2001 From: Alexandre Bourget <alex@bourget.cc> Date: Fri, 21 Sep 2007 11:08:15 -0400 Subject: [PATCH] Fix headers, copyright notices, and doxygen tags Tiny doc fixes and typos. --- src/account.cpp | 3 +- src/accountcreator.cpp | 7 ++--- src/accountcreator.h | 5 ++-- src/audio/audiofile.cpp | 4 +-- src/audio/audiofile.h | 4 +-- src/audio/audiortp.cpp | 3 +- src/audio/audiortp.h | 3 +- src/audio/codecDescriptor.cpp | 2 +- src/audio/codecDescriptor.h | 2 +- src/audio/common.h | 2 +- src/audio/dtmfgenerator.cpp | 2 +- src/audio/ringbuffer.h | 2 +- src/config/config.cpp | 3 +- src/config/config.h | 23 ++++++++++++++- src/dbus/callmanager.cpp | 1 + src/dbus/configurationmanager.h | 1 + src/iaxaccount.cpp | 3 +- src/iaxaccount.h | 3 +- src/iaxcall.cpp | 3 +- src/iaxcall.h | 3 +- src/iaxvoiplink.cpp | 3 +- src/iaxvoiplink.h | 3 +- src/main.cpp | 3 +- src/managerimpl.cpp | 11 +++---- src/managerimpl.h | 52 +++++++++++++++++++++++---------- src/sipaccount.cpp | 3 +- src/sipaccount.h | 3 +- src/sipcall.cpp | 3 +- src/sipcall.h | 3 +- src/voiplink.cpp | 3 +- src/voiplink.h | 3 +- 31 files changed, 115 insertions(+), 54 deletions(-) diff --git a/src/account.cpp b/src/account.cpp index ea1fc8ddf8..3dd17f0638 100644 --- a/src/account.cpp +++ b/src/account.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify diff --git a/src/accountcreator.cpp b/src/accountcreator.cpp index aa590244d1..3a062af0fd 100644 --- a/src/accountcreator.cpp +++ b/src/accountcreator.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify @@ -18,9 +19,7 @@ */ #include "accountcreator.h" #include "sipaccount.h" -#ifdef USE_IAX #include "iaxaccount.h" -#endif AccountCreator::AccountCreator() { @@ -40,9 +39,7 @@ AccountCreator::createAccount(AccountType type, AccountID accountID) break; case IAX_ACCOUNT: -#ifdef USE_IAX return new IAXAccount(accountID); -#endif break; } return 0; diff --git a/src/accountcreator.h b/src/accountcreator.h index 105de35c1a..c7ff65139c 100644 --- a/src/accountcreator.h +++ b/src/accountcreator.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify @@ -43,7 +44,7 @@ public: static Account* createAccount(AccountType type, AccountID accountID); private: - /** Hidden creator */ + /** Hidden constructor */ AccountCreator(); }; diff --git a/src/audio/audiofile.cpp b/src/audio/audiofile.cpp index 00241e6d3b..952ce8a9e1 100644 --- a/src/audio/audiofile.cpp +++ b/src/audio/audiofile.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. +/* + * Copyright (C) 2005-2007 Savoir-Faire Linux inc. * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * Inspired by tonegenerator of diff --git a/src/audio/audiofile.h b/src/audio/audiofile.h index e2dbb169c8..778e50c64d 100644 --- a/src/audio/audiofile.h +++ b/src/audio/audiofile.h @@ -1,5 +1,5 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. +/* + * Copyright (C) 2005-2007 Savoir-Faire Linux inc. * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * Inspired by tonegenerator of diff --git a/src/audio/audiortp.cpp b/src/audio/audiortp.cpp index 6b7d13aeaf..fe6f0833a0 100644 --- a/src/audio/audiortp.cpp +++ b/src/audio/audiortp.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Copyright (C) 2004-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> * diff --git a/src/audio/audiortp.h b/src/audio/audiortp.h index bc5d4b0728..4b01827692 100644 --- a/src/audio/audiortp.h +++ b/src/audio/audiortp.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Copyright (C) 2004-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> * diff --git a/src/audio/codecDescriptor.cpp b/src/audio/codecDescriptor.cpp index 0b1032f365..c04821faeb 100644 --- a/src/audio/codecDescriptor.cpp +++ b/src/audio/codecDescriptor.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2004-2005 Savoir-Faire Linux inc. * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> diff --git a/src/audio/codecDescriptor.h b/src/audio/codecDescriptor.h index 95c525566c..8d0078014b 100644 --- a/src/audio/codecDescriptor.h +++ b/src/audio/codecDescriptor.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2004-2005 Savoir-Faire Linux inc. * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> diff --git a/src/audio/common.h b/src/audio/common.h index 5594a1a00b..c574ae15c2 100644 --- a/src/audio/common.h +++ b/src/audio/common.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2004-2005 Savoir-Faire Linux inc. * Author: * diff --git a/src/audio/dtmfgenerator.cpp b/src/audio/dtmfgenerator.cpp index ec667d44c4..3b36bac57a 100644 --- a/src/audio/dtmfgenerator.cpp +++ b/src/audio/dtmfgenerator.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2004-2005 Savoir-Faire Linux inc. * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> diff --git a/src/audio/ringbuffer.h b/src/audio/ringbuffer.h index 1faa54ae9a..2817447725 100644 --- a/src/audio/ringbuffer.h +++ b/src/audio/ringbuffer.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2004-2005 Savoir-Faire Linux inc. * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com> diff --git a/src/config/config.cpp b/src/config/config.cpp index 8f307be010..136e9043eb 100644 --- a/src/config/config.cpp +++ b/src/config/config.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2005 Savoir-Faire Linux inc. + * Copyright (C) 2005-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify diff --git a/src/config/config.h b/src/config/config.h index 9171470c08..b201ac2711 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2005-2006 Savoir-Faire Linux inc. + * Copyright (C) 2005-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify @@ -64,7 +65,27 @@ public: ~ConfigTree(); void createSection(const std::string& section); + + /** + * Return an array of strings, listing the sections of the config file + * + * This will be mainly used to filter which sections are an + * "Account" definition. + * + * @return array Strings of the sections + */ + TokenList getSections(); + void addConfigTreeItem(const std::string& section, const ConfigTreeItem item); + /** + * Verify an item is there. If it's not, add it with the provided + * default value + * + * @param section Section + * @param + */ + void verifyConfigTreeItem(const std::string& section, const std::string& itemName, + const std::string& defaultValue, const std::string& type); bool setConfigTreeItem(const std::string& section, const std::string& itemName, const std::string& value); // throw a ConfigTreeItemException if not found diff --git a/src/dbus/callmanager.cpp b/src/dbus/callmanager.cpp index 9b073950b7..70bdeabb3b 100644 --- a/src/dbus/callmanager.cpp +++ b/src/dbus/callmanager.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2007 Savoir-Faire Linux inc. * Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com> + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * * 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 diff --git a/src/dbus/configurationmanager.h b/src/dbus/configurationmanager.h index 2a6a41121e..53b84ff39c 100644 --- a/src/dbus/configurationmanager.h +++ b/src/dbus/configurationmanager.h @@ -1,6 +1,7 @@ /* * Copyright (C) 2007 Savoir-Faire Linux inc. * Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com> + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * * 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 diff --git a/src/iaxaccount.cpp b/src/iaxaccount.cpp index 78863ebefc..88c12f5b4e 100644 --- a/src/iaxaccount.cpp +++ b/src/iaxaccount.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify diff --git a/src/iaxaccount.h b/src/iaxaccount.h index af6090547b..663ba07751 100644 --- a/src/iaxaccount.h +++ b/src/iaxaccount.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify diff --git a/src/iaxcall.cpp b/src/iaxcall.cpp index 3a0e1d4576..0388d5cb1f 100644 --- a/src/iaxcall.cpp +++ b/src/iaxcall.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify diff --git a/src/iaxcall.h b/src/iaxcall.h index 5fb10c3cb9..bc27117ac0 100644 --- a/src/iaxcall.h +++ b/src/iaxcall.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify diff --git a/src/iaxvoiplink.cpp b/src/iaxvoiplink.cpp index 6232fea443..164c3afcfd 100644 --- a/src/iaxvoiplink.cpp +++ b/src/iaxvoiplink.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify diff --git a/src/iaxvoiplink.h b/src/iaxvoiplink.h index 9105148aa4..7ce9caa956 100644 --- a/src/iaxvoiplink.h +++ b/src/iaxvoiplink.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify diff --git a/src/main.cpp b/src/main.cpp index 393a466468..0247fa23a7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Copyright (C) 2004-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> * diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index 77050c1e06..af34a57324 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -1,18 +1,19 @@ /* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. + * Copyright (C) 2004-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com> - * + * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> + * * 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. - * + * * 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. - * + * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/src/managerimpl.h b/src/managerimpl.h index a7b6b5062b..4af45ccf58 100644 --- a/src/managerimpl.h +++ b/src/managerimpl.h @@ -81,25 +81,29 @@ public: ManagerImpl (void); ~ManagerImpl (void); - // Init a new VoIPLink, audio codec and audio driver /** - * Initialisation of thread (sound) and map + * Initialisation of thread (sound) and map. + * + * Init a new VoIPLink, audio codec and audio driver */ void init (void); /** - * Terminate all thread (sound, link) and clear map + * Terminate all thread (sound, link) and unload AccountMap */ void terminate (void); /** - * Set the graphic user interface : only GuiServer right now - * @param gui A GuiFramework gui implmentation + * Set user interface manaager. + * @param man The DBUS interface implementation */ void setDBusManager (DBusManagerImpl* man) { _dbus = man; } - // Accessor to audiodriver - // it's multi-thread and use mutex internally + /** + * Accessor to audiodriver. + * + * it's multi-thread and use mutex internally + */ AudioLayer* getAudioDriver(void) const { return _audiodriver; } /** @@ -121,21 +125,29 @@ public: void unmute(); bool refuseCall(const CallID& id); - /** Save config on file */ + /** Save config to file */ bool saveConfig (void); + /** - * Initialize action (main thread) + * Send registration information (shake hands) for a specific AccountID + * * @param accountId Account to register * @return true if setRegister is call without failure, else return false */ bool registerVoIPLink(const AccountID& accountId); /** - * Unregister an account + * Send unregistration for a specific account. If the protocol + * doesn't need to send anything, then the state of the account + * will be set to 'Unregistered', and related objects destroyed. + * * @param accountId Account to unregister * @return true if the unregister method is send correctly */ bool unregisterVoIPLink(const AccountID& accountId); + /** + * Undocumented + */ bool sendTextMessage(const AccountID& accountId, const std::string& to, const std::string& message); /* @@ -178,8 +190,15 @@ public: void registrationFailed(const AccountID& accountId); // configuration function requests - /** Start events thread*/ - // TODO: receive account name + + /** + * Start events thread. This function actually only calls the private + * initRegisterVoIPLink(). + * + * This function should definitively be renamed! + * + * @todo Receive account name (???) + */ bool getEvents(); // @@ -283,9 +302,12 @@ public: */ bool behindNat(const std::string& svr, int port); - /** - * Init default values for the different fields - */ + /** + * Init default values for the different fields in the config file. + * Fills the local _config (Conf::ConfigTree) with the default contents. + * + * Called in main.cpp, just before Manager::init(). + */ void initConfigFile (void); /** diff --git a/src/sipaccount.cpp b/src/sipaccount.cpp index 480c21af90..b56d37546f 100644 --- a/src/sipaccount.cpp +++ b/src/sipaccount.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify diff --git a/src/sipaccount.h b/src/sipaccount.h index 9a0ccea8b7..0c9e4b511b 100644 --- a/src/sipaccount.h +++ b/src/sipaccount.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2006 Savoir-Faire Linux inc. + * Copyright (C) 2006-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify diff --git a/src/sipcall.cpp b/src/sipcall.cpp index 9a55611117..36010b4d73 100644 --- a/src/sipcall.cpp +++ b/src/sipcall.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. + * Copyright (C) 2004-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com> * diff --git a/src/sipcall.h b/src/sipcall.h index 521297b060..e2c40c1a1c 100644 --- a/src/sipcall.h +++ b/src/sipcall.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. + * Copyright (C) 2004-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com> * diff --git a/src/voiplink.cpp b/src/voiplink.cpp index 61a3a4cc7c..e72845b838 100644 --- a/src/voiplink.cpp +++ b/src/voiplink.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2005-2006 Savoir-Faire Linux inc. + * Copyright (C) 2005-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com> * diff --git a/src/voiplink.h b/src/voiplink.h index 9f74bdbeb0..69fc30530a 100644 --- a/src/voiplink.h +++ b/src/voiplink.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2005-2006 Savoir-Faire Linux inc. + * Copyright (C) 2005-2007 Savoir-Faire Linux inc. + * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Yan Morin <yan.morin@savoirfairelinux.com> * Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com> * -- GitLab