diff --git a/src/account.cpp b/src/account.cpp index ea1fc8ddf..3dd17f063 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 * Author: Yan Morin * * This program is free software; you can redistribute it and/or modify diff --git a/src/accountcreator.cpp b/src/accountcreator.cpp index aa590244d..3a062af0f 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 * Author: Yan Morin * * 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 105de35c1..c7ff65139 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 * Author: Yan Morin * * 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 00241e6d3..952ce8a9e 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 * * Inspired by tonegenerator of diff --git a/src/audio/audiofile.h b/src/audio/audiofile.h index e2dbb169c..778e50c64 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 * * Inspired by tonegenerator of diff --git a/src/audio/audiortp.cpp b/src/audio/audiortp.cpp index 6b7d13aea..fe6f0833a 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 * Author: Yan Morin * Author: Laurielle Lea * diff --git a/src/audio/audiortp.h b/src/audio/audiortp.h index bc5d4b072..4b0182769 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 * Author: Yan Morin * Author: Laurielle Lea * diff --git a/src/audio/codecDescriptor.cpp b/src/audio/codecDescriptor.cpp index 0b1032f36..c04821fae 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 * Author: Laurielle Lea diff --git a/src/audio/codecDescriptor.h b/src/audio/codecDescriptor.h index 95c525566..8d0078014 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 * Author: Laurielle Lea diff --git a/src/audio/common.h b/src/audio/common.h index 5594a1a00..c574ae15c 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 ec667d44c..3b36bac57 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 * Author: Laurielle Lea diff --git a/src/audio/ringbuffer.h b/src/audio/ringbuffer.h index 1faa54ae9..281744772 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 * Author : Laurielle Lea diff --git a/src/config/config.cpp b/src/config/config.cpp index 8f307be01..136e9043e 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 * Author: Yan Morin * * 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 9171470c0..b201ac271 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 * Author: Yan Morin * * 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 9b073950b..70bdeabb3 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 + * Author: Alexandre Bourget * * 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 2a6a41121..53b84ff39 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 + * Author: Alexandre Bourget * * 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 78863ebef..88c12f5b4 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 * Author: Yan Morin * * This program is free software; you can redistribute it and/or modify diff --git a/src/iaxaccount.h b/src/iaxaccount.h index af6090547..663ba0775 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 * Author: Yan Morin * * This program is free software; you can redistribute it and/or modify diff --git a/src/iaxcall.cpp b/src/iaxcall.cpp index 3a0e1d457..0388d5cb1 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 * Author: Yan Morin * * This program is free software; you can redistribute it and/or modify diff --git a/src/iaxcall.h b/src/iaxcall.h index 5fb10c3cb..bc27117ac 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 * Author: Yan Morin * * This program is free software; you can redistribute it and/or modify diff --git a/src/iaxvoiplink.cpp b/src/iaxvoiplink.cpp index 6232fea44..164c3afcf 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 * Author: Yan Morin * * This program is free software; you can redistribute it and/or modify diff --git a/src/iaxvoiplink.h b/src/iaxvoiplink.h index 9105148aa..7ce9caa95 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 * Author: Yan Morin * * This program is free software; you can redistribute it and/or modify diff --git a/src/main.cpp b/src/main.cpp index 393a46646..0247fa23a 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 * Author: Yan Morin * Author: Laurielle Lea * diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index 77050c1e0..af34a5732 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 * Author: Yan Morin - * Author : Laurielle Lea - * + * Author: Laurielle Lea + * * 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 a7b6b5062..4af45ccf5 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 480c21af9..b56d37546 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 * Author: Yan Morin * * This program is free software; you can redistribute it and/or modify diff --git a/src/sipaccount.h b/src/sipaccount.h index 9a0ccea8b..0c9e4b511 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 * Author: Yan Morin * * This program is free software; you can redistribute it and/or modify diff --git a/src/sipcall.cpp b/src/sipcall.cpp index 9a5561111..36010b4d7 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 * Author: Yan Morin * Author : Laurielle Lea * diff --git a/src/sipcall.h b/src/sipcall.h index 521297b06..e2c40c1a1 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 * Author: Yan Morin * Author : Laurielle Lea * diff --git a/src/voiplink.cpp b/src/voiplink.cpp index 61a3a4cc7..e72845b83 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 * Author: Yan Morin * Author : Laurielle Lea * diff --git a/src/voiplink.h b/src/voiplink.h index 9f74bdbeb..69fc30530 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 * Author: Yan Morin * Author : Laurielle Lea *