Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
5237c352
Commit
5237c352
authored
19 years ago
by
jpbl
Browse files
Options
Downloads
Patches
Plain Diff
We added a getLine function
parent
648cf5cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/gui/official/PhoneLineManagerImpl.cpp
+39
-0
39 additions, 0 deletions
src/gui/official/PhoneLineManagerImpl.cpp
src/gui/official/PhoneLineManagerImpl.hpp
+15
-0
15 additions, 0 deletions
src/gui/official/PhoneLineManagerImpl.hpp
with
54 additions
and
0 deletions
src/gui/official/PhoneLineManagerImpl.cpp
+
39
−
0
View file @
5237c352
...
...
@@ -178,6 +178,45 @@ PhoneLineManagerImpl::getNextAvailableLine()
return
selectedLine
;
}
PhoneLine
*
PhoneLineManagerImpl
::
getLine
(
const
Call
&
call
)
{
isInitialized
();
PhoneLine
*
selectedLine
=
NULL
;
QMutexLocker
guard
(
&
mPhoneLinesMutex
);
unsigned
int
i
=
0
;
while
(
i
<
mPhoneLines
.
size
()
&&
!
selectedLine
)
{
mPhoneLines
[
i
]
->
lock
();
if
(
mPhoneLines
[
i
]
->
getCallId
()
==
call
->
id
())
selectedLine
=
mPhoneLines
[
i
];
}
else
{
mPhoneLines
[
i
]
->
unlock
();
i
++
;
}
}
return
selectedLine
;
}
PhoneLine
*
PhoneLineManagerImpl
::
getLine
(
unsigned
int
line
)
{
isInitialized
();
PhoneLine
*
selectedLine
=
NULL
;
QMutexLocker
guard
(
&
mPhoneLinesMutex
);
if
(
line
<
mPhoneLines
.
size
())
{
selectedLine
=
mPhoneLines
[
line
];
selectedLine
->
lock
();
}
return
selectedLine
;
}
PhoneLine
*
PhoneLineManagerImpl
::
selectNextAvailableLine
()
{
...
...
This diff is collapsed.
Click to expand it.
src/gui/official/PhoneLineManagerImpl.hpp
+
15
−
0
View file @
5237c352
...
...
@@ -169,6 +169,21 @@ public slots:
*/
PhoneLine
*
getNextAvailableLine
();
/**
* This function will return the PhoneLine with the
* given id. If there's no such line, it will return
* NULL. The line is locked, So you'll need to unlock it.
*/
PhoneLine
*
getLine
(
unsigned
int
line
);
/**
* This function will return the PhoneLine with the
* given call id. If there's no such line, it will
* return NULL. The line is locked, So you'll need to
* unlock it.
*/
PhoneLine
*
getLine
(
const
Call
&
call
);
/**
* This function will return the next available line.
* The line is NOT locked.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment