145f2b998a952e2e24121330189e091d84def84b
Stefan Schuermans implemented extension confi...

Stefan Schuermans authored 12 years ago

src/noarch/PhoneExtension_impl.h  1) /* Blinker
Stefan Schuermans update copyright years

Stefan Schuermans authored 10 years ago

src/noarch/PhoneExtension_impl.h  2)    Copyright 2011-2014 Stefan Schuermans <stefan@blinkenarea.org>
Stefan Schuermans implemented extension confi...

Stefan Schuermans authored 12 years ago

src/noarch/PhoneExtension_impl.h  3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
src/noarch/PhoneExtension_impl.h  4)    a blinkenarea.org project */
src/noarch/PhoneExtension_impl.h  5) 
src/noarch/PhoneExtension_impl.h  6) #ifndef BLINKER_PHONEEXTENSION_IMPL_H
src/noarch/PhoneExtension_impl.h  7) #define BLINKER_PHONEEXTENSION_IMPL_H
src/noarch/PhoneExtension_impl.h  8) 
src/noarch/PhoneExtension_impl.h  9) #include <string>
src/noarch/PhoneExtension_impl.h 10) 
src/noarch/PhoneExtension_impl.h 11) #include "Directory.h"
src/noarch/PhoneExtension_impl.h 12) #include "File.h"
src/noarch/PhoneExtension_impl.h 13) #include "Module.h"
src/noarch/PhoneExtension_impl.h 14) #include "NameFile.h"
src/noarch/PhoneExtension_impl.h 15) #include "Phone.h"
src/noarch/PhoneExtension_impl.h 16) #include "PhoneExtension.h"
src/noarch/PhoneExtension_impl.h 17) 
src/noarch/PhoneExtension_impl.h 18) namespace Blinker {
src/noarch/PhoneExtension_impl.h 19) 
src/noarch/PhoneExtension_impl.h 20) /**
src/noarch/PhoneExtension_impl.h 21)  * @brief constructor
src/noarch/PhoneExtension_impl.h 22)  * @param[in] phone owning phone object
src/noarch/PhoneExtension_impl.h 23)  * @param[in] name extension name (i.e. phone number)
src/noarch/PhoneExtension_impl.h 24)  * @param[in] dirBase base directory
src/noarch/PhoneExtension_impl.h 25)  */
src/noarch/PhoneExtension_impl.h 26) template<typename ADDR, typename SOCK>
src/noarch/PhoneExtension_impl.h 27) Phone<ADDR, SOCK>::Extension::Extension(Phone &phone, const std::string &name,
src/noarch/PhoneExtension_impl.h 28)                                const Directory &dirBase):
src/noarch/PhoneExtension_impl.h 29)   m_phone(phone),
src/noarch/PhoneExtension_impl.h 30)   m_name(name),
Stefan Schuermans rename "module" to "target"

Stefan Schuermans authored 5 years ago

src/common/PhoneExtension_impl.h 31)   m_fileTarget(dirBase.getFile("target"))
Stefan Schuermans implemented extension confi...

Stefan Schuermans authored 12 years ago

src/noarch/PhoneExtension_impl.h 32) {
src/noarch/PhoneExtension_impl.h 33)   // set up
Stefan Schuermans rename "module" to "target"

Stefan Schuermans authored 5 years ago

src/common/PhoneExtension_impl.h 34)   getTarget();
Stefan Schuermans implemented extension confi...

Stefan Schuermans authored 12 years ago

src/noarch/PhoneExtension_impl.h 35) }
src/noarch/PhoneExtension_impl.h 36) 
src/noarch/PhoneExtension_impl.h 37) /// destructor
src/noarch/PhoneExtension_impl.h 38) template<typename ADDR, typename SOCK>
src/noarch/PhoneExtension_impl.h 39) Phone<ADDR, SOCK>::Extension::~Extension()
src/noarch/PhoneExtension_impl.h 40) {
src/noarch/PhoneExtension_impl.h 41)   // remove extension from extension map
src/noarch/PhoneExtension_impl.h 42)   m_phone.m_extMap.erase(m_name);
src/noarch/PhoneExtension_impl.h 43) }
src/noarch/PhoneExtension_impl.h 44) 
src/noarch/PhoneExtension_impl.h 45) /// check for update of configuration
src/noarch/PhoneExtension_impl.h 46) template<typename ADDR, typename SOCK>
src/noarch/PhoneExtension_impl.h 47) void Phone<ADDR, SOCK>::Extension::updateConfig()
src/noarch/PhoneExtension_impl.h 48) {
Stefan Schuermans rename "module" to "target"

Stefan Schuermans authored 5 years ago

src/common/PhoneExtension_impl.h 49)   // target file was modified -> re-get target operator interface to connect to
src/common/PhoneExtension_impl.h 50)   if (m_fileTarget.checkModified())
src/common/PhoneExtension_impl.h 51)     getTarget();
Stefan Schuermans implemented extension confi...

Stefan Schuermans authored 12 years ago

src/noarch/PhoneExtension_impl.h 52) }
src/noarch/PhoneExtension_impl.h 53) 
Stefan Schuermans rename "module" to "target"

Stefan Schuermans authored 5 years ago

src/common/PhoneExtension_impl.h 54) /// (re-)get target operator interface to connect to
Stefan Schuermans implemented extension confi...

Stefan Schuermans authored 12 years ago

src/noarch/PhoneExtension_impl.h 55) template<typename ADDR, typename SOCK>
Stefan Schuermans rename "module" to "target"

Stefan Schuermans authored 5 years ago

src/common/PhoneExtension_impl.h 56) void Phone<ADDR, SOCK>::Extension::getTarget()
Stefan Schuermans implemented extension confi...

Stefan Schuermans authored 12 years ago

src/noarch/PhoneExtension_impl.h 57) {
src/noarch/PhoneExtension_impl.h 58)   // remove old extension information from extension map
src/noarch/PhoneExtension_impl.h 59)   m_phone.m_extMap.erase(m_name);
src/noarch/PhoneExtension_impl.h 60) 
src/noarch/PhoneExtension_impl.h 61)   // get new module name from file
Stefan Schuermans rename "module" to "target"

Stefan Schuermans authored 5 years ago

src/common/PhoneExtension_impl.h 62)   m_fileTarget.update();
Stefan Schuermans implemented extension confi...

Stefan Schuermans authored 12 years ago

src/noarch/PhoneExtension_impl.h 63) 
src/noarch/PhoneExtension_impl.h 64)   // add new module name to extension map
Stefan Schuermans rename "module" to "target"

Stefan Schuermans authored 5 years ago

src/common/PhoneExtension_impl.h 65)   if (m_fileTarget.m_valid)
src/common/PhoneExtension_impl.h 66)     m_phone.m_extMap[m_name] = m_fileTarget.m_obj.m_str;