Skip to content
Snippets Groups Projects
Commit 2dcc14a0 authored by jpbl's avatar jpbl
Browse files

added some comments for PhoneLineManagerImpl

parent 8add3e0c
No related branches found
No related tags found
No related merge requests found
......@@ -35,10 +35,12 @@ void
PhoneLineManagerImpl::initialize()
{
QMutexLocker guard(&mIsInitializedMutex);
if(!mIsInitialized) {
mIsInitialized = true;
mSession = new Session();
mAccount = new Account(mSession->getDefaultAccount());
}
}
void PhoneLineManagerImpl::isInitialized()
{
......@@ -49,7 +51,7 @@ void PhoneLineManagerImpl::isInitialized()
}
void
PhoneLineManagerImpl::start()
PhoneLineManagerImpl::startSession()
{
isInitialized();
......
......@@ -46,8 +46,20 @@ signals:
void selected(unsigned int);
public slots:
/**
* You need to call this function once. It must be
* call before doing anything in this class.
*
* NOTE: You need to set the creator to SessionIOFactory
* before calling this function.
*/
void initialize();
void start();
/**
* This will send all the command needed when a
* connection has just been established.
*/
void startSession();
void sendKey(Qt::Key c);
......
......@@ -12,7 +12,7 @@ TCPSessionIOCreator::create()
{
TCPSessionIO *t = new TCPSessionIO(mHostname, mPort);
QObject::connect(t, SIGNAL(connected()),
&PhoneLineManager::instance(), SLOT(start()));
&PhoneLineManager::instance(), SLOT(startSession()));
t->connect();
return t;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment