Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-client-uwp
Commits
d57809fd
Commit
d57809fd
authored
Oct 06, 2016
by
Nicolas Jager
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix : incomming sip message
Change-Id: Ifc5bfb1c076816767c350a34d88d5efc102e3122 Tuleap: #1210
parent
8f805cd5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
12 deletions
+34
-12
ContactsViewModel.cpp
ContactsViewModel.cpp
+6
-3
ContactsViewModel.h
ContactsViewModel.h
+1
-1
MessageTextPage.xaml.cpp
MessageTextPage.xaml.cpp
+1
-1
MessageTextPage.xaml.h
MessageTextPage.xaml.h
+1
-1
RingD.cpp
RingD.cpp
+2
-2
RingD.h
RingD.h
+1
-1
Utils.h
Utils.h
+20
-1
VideoPage.xaml.cpp
VideoPage.xaml.cpp
+1
-1
VideoPage.xaml.h
VideoPage.xaml.h
+1
-1
No files found.
ContactsViewModel.cpp
View file @
d57809fd
...
...
@@ -170,9 +170,12 @@ ContactsViewModel::Destringify(String^ data)
}
void
RingClientUWP
::
ViewModel
::
ContactsViewModel
::
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
from
,
Platform
::
String
^
payload
)
void
RingClientUWP
::
ViewModel
::
ContactsViewModel
::
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
payload
)
{
auto
contact
=
findContactByName
(
from
);
auto
item
=
SmartPanelItemsViewModel
::
instance
->
findItem
(
callId
);
auto
contact
=
item
->
_contact
;
/* the contact HAS TO BE already registered */
if
(
contact
)
{
...
...
@@ -185,7 +188,7 @@ void RingClientUWP::ViewModel::ContactsViewModel::OnincomingMessage(Platform::St
auto
selectedContact
=
(
item
)
?
item
->
_contact
:
nullptr
;
if
(
contact
->
ringID_
==
from
&&
contact
!=
selectedContact
)
{
if
(
contact
!=
selectedContact
)
{
contact
->
_unreadMessages
++
;
/* saveContactsToFile used to save the notification */
saveContactsToFile
();
...
...
ContactsViewModel.h
View file @
d57809fd
...
...
@@ -68,7 +68,7 @@ private:
Contact
^
currentItem_
;
Contact
^
oldItem_
;
void
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
from
,
Platform
::
String
^
payload
);
void
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
payload
);
};
}
}
MessageTextPage.xaml.cpp
View file @
d57809fd
...
...
@@ -139,7 +139,7 @@ RingClientUWP::Views::BubbleHorizontalAlignement::BubbleHorizontalAlignement()
{}
void
RingClientUWP
::
Views
::
MessageTextPage
::
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
from
,
Platform
::
String
^
payload
)
void
RingClientUWP
::
Views
::
MessageTextPage
::
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
payload
)
{
scrollDown
();
}
MessageTextPage.xaml.h
View file @
d57809fd
...
...
@@ -49,7 +49,7 @@ private:
void
_sendBtn__Click
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
RoutedEventArgs
^
e
);
void
_messageTextBox__KeyDown
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
Input
::
KeyRoutedEventArgs
^
e
);
void
sendMessage
();
void
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
from
,
Platform
::
String
^
payload
);
void
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
payload
);
};
}
}
RingD.cpp
View file @
d57809fd
...
...
@@ -296,7 +296,7 @@ RingClientUWP::RingD::startDaemon()
auto
callId2
=
toPlatformString
(
callId
);
auto
from2
=
toPlatformString
(
from
);
from2
=
Utils
::
Trim
RingId2
(
from2
);
///
from2 = Utils::Trim
From
(from2);
const
std
::
string
PROFILE_VCF
=
"x-ring/ring.profile.vcard"
;
...
...
@@ -314,7 +314,7 @@ RingClientUWP::RingD::startDaemon()
CoreApplication
::
MainView
->
CoreWindow
->
Dispatcher
->
RunAsync
(
CoreDispatcherPriority
::
High
,
ref
new
DispatchedHandler
([
=
]()
{
incomingMessage
(
callId2
,
from2
,
payload
);
incomingMessage
(
callId2
,
payload
);
MSG_
(
"message recu :"
+
i
.
second
);
}));
}
...
...
RingD.h
View file @
d57809fd
...
...
@@ -31,7 +31,7 @@ delegate void IncomingCall(String^ accountId, String^ callId, String^ from);
delegate
void
StateChange
(
String
^
callId
,
CallStatus
state
,
int
code
);
delegate
void
IncomingAccountMessage
(
String
^
accountId
,
String
^
from
,
String
^
payload
);
delegate
void
CallPlaced
(
String
^
callId
);
delegate
void
IncomingMessage
(
String
^
callId
,
String
^
from
,
String
^
payload
);
delegate
void
IncomingMessage
(
String
^
callId
,
String
^
payload
);
public
ref
class
RingD
sealed
...
...
Utils.h
View file @
d57809fd
...
...
@@ -135,6 +135,7 @@ TrimRingId(Platform::String^ s)
/* fix some issue in the daemon --> remove "@..." */
Platform
::
String
^
TrimRingId2
(
Platform
::
String
^
s
)
{
const
WCHAR
*
first
=
s
->
Begin
();
...
...
@@ -148,6 +149,24 @@ TrimRingId2(Platform::String^ s)
return
ref
new
Platform
::
String
(
first
,
static_cast
<
unsigned
int
>
(
last
-
first
));
}
Platform
::
String
^
TrimFrom
(
Platform
::
String
^
s
)
{
const
WCHAR
*
first
=
s
->
Begin
();
const
WCHAR
*
last
=
s
->
End
();
while
(
first
!=
last
&&
*
first
!=
':'
)
++
first
;
while
(
first
!=
last
&&
last
[
-
1
]
!=
'>'
)
--
last
;
first
++
;
last
--
;
return
ref
new
Platform
::
String
(
first
,
static_cast
<
unsigned
int
>
(
last
-
first
));
}
Platform
::
String
^
GetNewGUID
()
{
...
...
@@ -167,7 +186,7 @@ getStringFromFile(const std::string& filename)
{
std
::
ifstream
file
(
filename
);
return
std
::
string
((
std
::
istreambuf_iterator
<
char
>
(
file
)),
(
std
::
istreambuf_iterator
<
char
>
()));
(
std
::
istreambuf_iterator
<
char
>
()));
}
inline
Map
<
String
^
,
String
^>^
...
...
VideoPage.xaml.cpp
View file @
d57809fd
...
...
@@ -332,7 +332,7 @@ VideoPage::WriteFrameAsSoftwareBitmapAsync(String^ id, uint8_t* buf, int width,
}
void
RingClientUWP
::
Views
::
VideoPage
::
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
from
,
Platform
::
String
^
payload
)
void
RingClientUWP
::
Views
::
VideoPage
::
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
payload
)
{
scrollDown
();
}
VideoPage.xaml.h
View file @
d57809fd
...
...
@@ -115,7 +115,7 @@ private:
void
_videoControl__PointerMoved
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
Input
::
PointerRoutedEventArgs
^
e
);
void
btnAny_entered
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
Input
::
PointerRoutedEventArgs
^
e
);
void
btnAny_exited
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
Input
::
PointerRoutedEventArgs
^
e
);
void
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
from
,
Platform
::
String
^
payload
);
void
OnincomingMessage
(
Platform
::
String
^
callId
,
Platform
::
String
^
payload
);
};
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
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