1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

init copy & modify

This commit is contained in:
Derek Dai 2016-09-14 16:24:14 +08:00
parent 9cd56f3eff
commit 5f39158f45
No known key found for this signature in database
GPG key ID: E109CC97553EF009
6 changed files with 1674 additions and 0 deletions

View file

@ -121,6 +121,7 @@ static int ctl_peer_parse_properties(struct ctl_peer *p,
'e',
"sv")) > 0) {
r = sd_bus_message_read(m, "s", &t);
log_info("==== sd_bus_message name: %s", t);
if (r < 0)
return cli_log_parser(r);
@ -760,6 +761,8 @@ static int ctl_wifi_parse_peer(struct ctl_wifi *w,
if (r < 0)
return r;
log_info("======= peer created: p=%p, l=%p, label=%s", p, l, label);
r = sd_bus_message_enter_container(m, 'a', "{sa{sv}}");
if (r < 0)
return cli_log_parser(r);
@ -771,6 +774,8 @@ static int ctl_wifi_parse_peer(struct ctl_wifi *w,
if (r < 0)
return cli_log_parser(r);
log_info("ctl_wifi_parse_peer: %p, %t", m, t);
if (strcmp(t, "org.freedesktop.miracle.wifi.Peer")) {
r = sd_bus_message_skip(m, "a{sv}");
if (r < 0)
@ -812,6 +817,8 @@ static int ctl_wifi_parse_object(struct ctl_wifi *w,
const char *t;
int r;
log_info("======== ctl_wifi_parse_object");
r = sd_bus_message_read(m, "o", &t);
if (r < 0)
return cli_log_parser(r);
@ -866,6 +873,8 @@ static int ctl_wifi_object_fn(sd_bus_message *m,
struct ctl_wifi *w = data;
bool added;
log_info("ooooooo");
added = !strcmp(sd_bus_message_get_member(m), "InterfacesAdded");
return ctl_wifi_parse_object(w, m, added);