Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-uwp
Commits
de3b02ee
Commit
de3b02ee
authored
Dec 20, 2016
by
atraczyk
Committed by
Andreas Traczyk
Jan 30, 2017
Browse files
fix: use named function for StateChange delegate instead of lambda
Change-Id: I99a2ebd575980523c22646a13390fcb5e3e5a872 Tuleap: #790
parent
61a726d4
Changes
2
Show whitespace changes
Inline
Side-by-side
SmartPanel.xaml.cpp
View file @
de3b02ee
...
...
@@ -115,8 +115,33 @@ SmartPanel::SmartPanel()
}
});
RingD
::
instance
->
stateChange
+=
ref
new
StateChange
([
this
](
String
^
callId
,
CallStatus
state
,
int
code
)
{
RingD
::
instance
->
stateChange
+=
ref
new
StateChange
(
this
,
&
SmartPanel
::
OnstateChange
);
RingD
::
instance
->
devicesListRefreshed
+=
ref
new
RingClientUWP
::
DevicesListRefreshed
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OndevicesListRefreshed
);
ContactsViewModel
::
instance
->
contactAdded
+=
ref
new
ContactAdded
([
this
](
Contact
^
contact
)
{
auto
smartPanelItem
=
ref
new
SmartPanelItem
();
smartPanelItem
->
_contact
=
contact
;
SmartPanelItemsViewModel
::
instance
->
itemsList
->
Append
(
smartPanelItem
);
});
RingD
::
instance
->
exportOnRingEnded
+=
ref
new
RingClientUWP
::
ExportOnRingEnded
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnexportOnRingEnded
);
RingD
::
instance
->
accountUpdated
+=
ref
new
RingClientUWP
::
AccountUpdated
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnaccountUpdated
);
RingD
::
instance
->
registeredNameFound
+=
ref
new
RingClientUWP
::
RegisteredNameFound
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnregisteredNameFound
);
RingD
::
instance
->
finishCaptureDeviceEnumeration
+=
ref
new
RingClientUWP
::
FinishCaptureDeviceEnumeration
([
this
]()
{
populateVideoDeviceSettingsComboBox
();
});
RingD
::
instance
->
registrationStateErrorGeneric
+=
ref
new
RingClientUWP
::
RegistrationStateErrorGeneric
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnregistrationStateErrorGeneric
);
RingD
::
instance
->
registrationStateRegistered
+=
ref
new
RingClientUWP
::
RegistrationStateRegistered
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnregistrationStateRegistered
);
RingD
::
instance
->
callPlaced
+=
ref
new
RingClientUWP
::
CallPlaced
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OncallPlaced
);
RingD
::
instance
->
incomingAccountMessage
+=
ref
new
RingClientUWP
::
IncomingAccountMessage
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnincomingAccountMessage
);
selectMenu
(
MenuOpen
::
CONTACTS_LIST
);
}
void
SmartPanel
::
OnstateChange
(
Platform
::
String
^
callId
,
RingClientUWP
::
CallStatus
state
,
int
code
)
{
auto
item
=
SmartPanelItemsViewModel
::
instance
->
findItem
(
callId
);
if
(
!
item
)
{
...
...
@@ -149,29 +174,6 @@ SmartPanel::SmartPanel()
default:
break
;
}
});
RingD
::
instance
->
devicesListRefreshed
+=
ref
new
RingClientUWP
::
DevicesListRefreshed
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OndevicesListRefreshed
);
ContactsViewModel
::
instance
->
contactAdded
+=
ref
new
ContactAdded
([
this
](
Contact
^
contact
)
{
auto
smartPanelItem
=
ref
new
SmartPanelItem
();
smartPanelItem
->
_contact
=
contact
;
SmartPanelItemsViewModel
::
instance
->
itemsList
->
Append
(
smartPanelItem
);
});
RingD
::
instance
->
exportOnRingEnded
+=
ref
new
RingClientUWP
::
ExportOnRingEnded
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnexportOnRingEnded
);
RingD
::
instance
->
accountUpdated
+=
ref
new
RingClientUWP
::
AccountUpdated
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnaccountUpdated
);
RingD
::
instance
->
registeredNameFound
+=
ref
new
RingClientUWP
::
RegisteredNameFound
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnregisteredNameFound
);
RingD
::
instance
->
finishCaptureDeviceEnumeration
+=
ref
new
RingClientUWP
::
FinishCaptureDeviceEnumeration
([
this
]()
{
populateVideoDeviceSettingsComboBox
();
});
RingD
::
instance
->
registrationStateErrorGeneric
+=
ref
new
RingClientUWP
::
RegistrationStateErrorGeneric
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnregistrationStateErrorGeneric
);
RingD
::
instance
->
registrationStateRegistered
+=
ref
new
RingClientUWP
::
RegistrationStateRegistered
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnregistrationStateRegistered
);
RingD
::
instance
->
callPlaced
+=
ref
new
RingClientUWP
::
CallPlaced
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OncallPlaced
);
RingD
::
instance
->
incomingAccountMessage
+=
ref
new
RingClientUWP
::
IncomingAccountMessage
(
this
,
&
RingClientUWP
::
Views
::
SmartPanel
::
OnincomingAccountMessage
);
selectMenu
(
MenuOpen
::
CONTACTS_LIST
);
}
void
...
...
SmartPanel.xaml.h
View file @
de3b02ee
...
...
@@ -157,6 +157,7 @@ private:
void
checkStateEditionMenu
();
void
ringTxtBxPlaceHolderDelay
(
String
^
placeHolderText
,
int
delayInMilliSeconds
);
void
showLinkThisDeviceStep1
();
void
OnstateChange
(
Platform
::
String
^
callId
,
RingClientUWP
::
CallStatus
state
,
int
code
);
/* members */
void
_addDevice__Click
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
RoutedEventArgs
^
e
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment