diff --git a/doc/images/polytechnique.jpg b/doc/images/polytechnique.jpg new file mode 100644 index 0000000000000000000000000000000000000000..232b9ea23d3eb7b00c5de119d2505e0e8a06fcad Binary files /dev/null and b/doc/images/polytechnique.jpg differ diff --git a/src/audio/audiodevice.h b/src/audio/audiodevice.h index 64c884be9a133748cb9155b251449a076937ba02..ccc5840324208bd5f161a1438bd21abcc5b08f5e 100644 --- a/src/audio/audiodevice.h +++ b/src/audio/audiodevice.h @@ -33,9 +33,8 @@ class AudioDevice { public: /** * Constructor - * @param id - * @param - * @param + * @param id Identifier + * @param name Name */ AudioDevice(int id, const std::string& name); diff --git a/src/audio/audiolayer.h b/src/audio/audiolayer.h index e56f5ad7a48bf13f2c3adfc3b75d4e5ced95da58..f303167348215b7cf36ec4608351739e997891f1 100644 --- a/src/audio/audiolayer.h +++ b/src/audio/audiolayer.h @@ -127,8 +127,8 @@ class AudioLayer { /** * Send a chunk of data to the hardware buffer to start the playback * Copy data in the urgent buffer. - * @params buffer The buffer containing the data to be played ( ringtones ) - * @params toCopy The size of the buffer + * @param buffer The buffer containing the data to be played ( ringtones ) + * @param toCopy The size of the buffer * @return int The number of bytes copied in the urgent buffer */ int putUrgent(void* buffer, int toCopy); @@ -158,7 +158,7 @@ class AudioLayer { /** * Scan the sound card available on the system - * @param flag To indicate whether we are looking for capture devices or playback devices + * @param stream To indicate whether we are looking for capture devices or playback devices * SFL_PCM_CAPTURE * SFL_PCM_PLAYBACK * SFL_PCM_BOTH diff --git a/src/audio/dtmf.h b/src/audio/dtmf.h index 9041514d48feaa2c70ce9a043f2b21b77b823108..a456975178ec217a44ee278af20f687ed55831f1 100644 --- a/src/audio/dtmf.h +++ b/src/audio/dtmf.h @@ -35,7 +35,7 @@ class DTMF { public: /** * Create a new DTMF. - * @param samplingRate frequency of the sample (ex: 8000 hz) + * @param sampleRate frequency of the sample (ex: 8000 hz) */ DTMF (unsigned int sampleRate); diff --git a/src/config/config.h b/src/config/config.h index f937b332d2108a01d11a0c969373eb8fce942e3f..5bcb9aa216987771f491e44c88ca42012a125b13 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -26,131 +26,153 @@ #include <list> /** - * Configuration namespace for ConfigTree object (like .ini files) + * @file config.h + * @brief Configuration namespace for ConfigTree object (like .ini files) */ namespace Conf { -class ConfigTreeItem; -typedef std::map<std::string, ConfigTreeItem> ItemMap; -typedef std::map<std::string, ItemMap*> SectionMap; -typedef std::list<std::string> TokenList; - -class ConfigTreeItemException { -public: - ConfigTreeItemException() {} - ~ConfigTreeItemException() {} -}; - -class ConfigTree; -class ConfigTreeIterator -{ -public: - TokenList begin(); - const TokenList& end() const { return _endToken; } - TokenList next(); - -private: - friend class ConfigTree; - ConfigTreeIterator(ConfigTree *configTree) : _tree(configTree) {} - - ConfigTree* _tree; - TokenList _endToken; - SectionMap::iterator _iter; - ItemMap::iterator _iterItem; -}; - -class ConfigTree { -public: - ConfigTree(); - ~ConfigTree(); - - void createSection(const std::string& section); - void removeSection(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); - /** - * Set a configuration value. - * - * @param section Write to this [section] of the .ini file - * @param itemName The itemName= in the .ini file - * @param value The value to assign to that itemName - */ - bool setConfigTreeItem(const std::string& section, const std::string& itemName, const std::string& value); - - /** - * Get a value. - * - * This function does all the validity tests, so none are needed throughout - * the program. - * - * @param section The name of the [section] in the .ini file. - * @param itemName The name of the item= in the .ini file. - * @return The value of the corresponding item. The default value if the section exists - * but the item doesn't. - */ - std::string getConfigTreeItemValue(const std::string& section, const std::string& itemName); - int getConfigTreeItemIntValue(const std::string& section, const std::string& itemName); - - /** - * Flush data to .ini file - */ - bool saveConfigTree(const std::string& fileName); - - /** - * Load data (and fill ConfigTree) from disk - */ - int populateFromFile(const std::string& fileName); - - bool getConfigTreeItemToken(const std::string& section, const std::string& itemName, TokenList& arg); - -private: - ConfigTreeItem* getConfigTreeItem(const std::string& section, const std::string& itemName); - - /** - * List of sections. Each sections has an ItemList as child - */ - SectionMap _sections; - friend class ConfigTreeIterator; - -public: - ConfigTreeIterator createIterator() { - return ConfigTreeIterator(this); - } -}; - -class ConfigTreeItem { -public: - ConfigTreeItem() : _defaultValue(""), _type("string") {} - // defaultvalue = value - ConfigTreeItem(const std::string& name, const std::string& value, const std::string& type) : - _name(name), _value(value), - _defaultValue(value), _type(type) {} - ConfigTreeItem(const std::string& name, const std::string& value, const std::string& defaultValue, const std::string& type) : - _name(name), _value(value), - _defaultValue(defaultValue), _type(type) {} - ~ConfigTreeItem() {} - - void setValue(const std::string& value) { _value = value; } - const std::string getName() const { return _name; } - const std::string getValue() const { return _value; } - const std::string getDefaultValue() const { return _defaultValue; } - const std::string getType() const { return _type; } - -private: - std::string _name; - std::string _value; - std::string _defaultValue; - std::string _type; -}; + class ConfigTreeItem; + typedef std::map<std::string, ConfigTreeItem> ItemMap; + typedef std::map<std::string, ItemMap*> SectionMap; + typedef std::list<std::string> TokenList; + + class ConfigTreeItemException { + public: + /** + * Constructor + * */ + ConfigTreeItemException() {} + + /** + * Destructor + * */ + ~ConfigTreeItemException() {} + }; + + class ConfigTree; + class ConfigTreeIterator + { + public: + /** + * Parsing method + * @return TokenList + */ + TokenList begin(); + + /** + * Parsing method + * @return TokenList + */ + const TokenList& end() const { return _endToken; } + + /** + * Parsing method + * @return TokenList + */ + TokenList next(); + + private: + friend class ConfigTree; + ConfigTreeIterator(ConfigTree *configTree) : _tree(configTree) {} + + ConfigTree* _tree; + TokenList _endToken; + SectionMap::iterator _iter; + ItemMap::iterator _iterItem; + }; + + class ConfigTree { + public: + ConfigTree(); + ~ConfigTree(); + + void createSection(const std::string& section); + void removeSection(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); + /** + * Set a configuration value. + * + * @param section Write to this [section] of the .ini file + * @param itemName The itemName= in the .ini file + * @param value The value to assign to that itemName + */ + bool setConfigTreeItem(const std::string& section, const std::string& itemName, const std::string& value); + + /** + * Get a value. + * + * This function does all the validity tests, so none are needed throughout + * the program. + * + * @param section The name of the [section] in the .ini file. + * @param itemName The name of the item= in the .ini file. + * @return The value of the corresponding item. The default value if the section exists + * but the item doesn't. + */ + std::string getConfigTreeItemValue(const std::string& section, const std::string& itemName); + int getConfigTreeItemIntValue(const std::string& section, const std::string& itemName); + + /** + * Flush data to .ini file + */ + bool saveConfigTree(const std::string& fileName); + + /** + * Load data (and fill ConfigTree) from disk + */ + int populateFromFile(const std::string& fileName); + + bool getConfigTreeItemToken(const std::string& section, const std::string& itemName, TokenList& arg); + + private: + ConfigTreeItem* getConfigTreeItem(const std::string& section, const std::string& itemName); + + /** + * List of sections. Each sections has an ItemList as child + */ + SectionMap _sections; + friend class ConfigTreeIterator; + + public: + ConfigTreeIterator createIterator() { + return ConfigTreeIterator(this); + } + }; + + class ConfigTreeItem { + public: + ConfigTreeItem() : _defaultValue(""), _type("string") {} + // defaultvalue = value + ConfigTreeItem(const std::string& name, const std::string& value, const std::string& type) : + _name(name), _value(value), + _defaultValue(value), _type(type) {} + ConfigTreeItem(const std::string& name, const std::string& value, const std::string& defaultValue, const std::string& type) : + _name(name), _value(value), + _defaultValue(defaultValue), _type(type) {} + ~ConfigTreeItem() {} + + void setValue(const std::string& value) { _value = value; } + const std::string getName() const { return _name; } + const std::string getValue() const { return _value; } + const std::string getDefaultValue() const { return _defaultValue; } + const std::string getType() const { return _type; } + + private: + std::string _name; + std::string _value; + std::string _defaultValue; + std::string _type; + }; } // end namespace ConfigTree