Browse Source

Merge pull request #46 from bboozzoo/bboozzoo/fix-build-and-warnings

many: build fixes, warning fixes, update discovery port
master
Maciej Borzecki 5 years ago
committed by GitHub
parent
commit
210b43570a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 140 additions and 122 deletions
  1. +1
    -1
      .travis.yml
  2. +1
    -1
      extra/install-tree
  3. +19
    -14
      extra/travis-build
  4. +1
    -1
      extra/uncrustify.cfg
  5. +5
    -2
      meson.build
  6. +7
    -4
      src/mconnect/application.vala
  7. +4
    -11
      src/mconnect/device-proxy.vala
  8. +11
    -13
      src/mconnect/device.vala
  9. +4
    -3
      src/mconnect/devicechannel.vala
  10. +10
    -6
      src/mconnect/devicemanager-proxy.vala
  11. +2
    -2
      src/mconnect/discovery.vala
  12. +1
    -1
      src/mconnect/logging.vala
  13. +6
    -6
      src/mconnect/mpris-proxies.vala
  14. +5
    -4
      src/mconnect/mpris.vala
  15. +3
    -3
      src/mconnect/packethandlerinterface-proxy.vala
  16. +6
    -6
      src/mconnect/share-proxy.vala
  17. +7
    -3
      src/mconnect/share.vala
  18. +2
    -2
      src/mconnect/telephony-proxy.vala
  19. +14
    -11
      src/mconnect/transfer-download.vala
  20. +2
    -4
      src/mconnect/transfer-manager-proxy.vala
  21. +2
    -1
      src/mconnect/transfer-manager.vala
  22. +4
    -4
      src/mconnect/transfer-proxy.vala
  23. +9
    -3
      src/mconnect/transfer-upload.vala
  24. +3
    -4
      src/mconnect/utils.vala
  25. +3
    -3
      src/mconnectctl/device-manager-iface.vala
  26. +4
    -4
      src/mconnectctl/share-iface.vala
  27. +2
    -2
      src/mconnectctl/telephony-iface.vala
  28. +2
    -3
      test/mconn-crypt-vala-test.vala

+ 1
- 1
.travis.yml View File

@ -6,7 +6,7 @@ env:
- DISTRO=fedora
- DISTRO=archlinux
- DISTRO=opensuse
- DISTRO=ubuntu-xenial
- DISTRO=ubuntu-bionic
script:
- ./extra/travis-build "${DISTRO}"

+ 1
- 1
extra/install-tree View File

@ -6,7 +6,7 @@
| `-- [-rwxr-xr-x] mconnectctl
`-- [drwxr-xr-x] share
|-- [drwxr-xr-x] applications
| `-- [-rw-rw-r--] mconnect.desktop
| `-- [-rw-r--r--] mconnect.desktop
`-- [drwxr-xr-x] mconnect
`-- [-rw-r--r--] mconnect.conf


+ 19
- 14
extra/travis-build View File

@ -40,7 +40,8 @@ deps_fedora() {
gtk3-devel \
glib-networking \
tree \
uncrustify
uncrustify \
diffutils
}
deps_opensuse() {
@ -82,10 +83,10 @@ deps_archlinux() {
uncrustify
}
deps_ubuntu_xenial() {
deps_ubuntu() {
apt-get update && \
apt-get install -y \
meson/xenial-backports \
meson \
pkg-config \
valac \
libgirepository1.0-dev \
@ -110,8 +111,8 @@ install_deps() {
archlinux)
deps_archlinux
;;
ubuntu-xenial)
deps_ubuntu_xenial
ubuntu-bionic)
deps_ubuntu
;;
*)
echo "unsupported distro $1"
@ -139,11 +140,11 @@ build() {
}
build_in_container() {
install_deps $1
install_deps "$1"
# distro specific quirks
case "$1" in
ubuntu-xenial|opensuse|fedora)
ubuntu-*|opensuse|fedora)
echo "$1 is using an outdated version of uncrustify, suppress formatting errors"
export SUPPRESS_FMT=1
;;
@ -158,25 +159,29 @@ spin_container() {
DOCKER_IMG=fedora
;;
archlinux)
DOCKER_IMG=base/archlinux
DOCKER_IMG=archlinux
;;
opensuse)
DOCKER_IMG=opensuse:tumbleweed
DOCKER_IMG=opensuse/tumbleweed
;;
ubuntu-xenial)
DOCKER_IMG=ubuntu:xenial
ubuntu-bionic)
DOCKER_IMG=ubuntu:bionic
;;
*)
echo "unsupported distro $1"
exit 1
esac
engine="docker"
if ! command -v "$engine" 2>/dev/null ; then
engine="podman"
fi
# run a container, mount sources at /mnt, st
docker run --rm \
-v $PWD:/mnt \
"$engine" run --rm \
-v "$PWD":/mnt \
-w /mnt \
-e IN_CONTAINER=1 \
$DOCKER_IMG \
"$DOCKER_IMG" \
/mnt/extra/travis-build "$@"
}


+ 1
- 1
extra/uncrustify.cfg View File

@ -984,7 +984,7 @@ nl_start_of_file = ignore # ignore/add/remove/force
nl_start_of_file_min = 0 # number
# Add or remove newline at the end of the file
nl_end_of_file = force # ignore/add/remove/force
nl_end_of_file = add # ignore/add/remove/force
# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force')
nl_end_of_file_min = 0 # number


+ 5
- 2
meson.build View File

@ -121,8 +121,11 @@ conf.set('bindir',
configure_file(output: 'mconnect.desktop',
input: 'mconnect.desktop.in',
configuration: conf,
install_dir: applicationsdir)
configuration: conf)
install_data(join_paths(meson.current_build_dir(), 'mconnect.desktop'),
install_dir: applicationsdir,
install_mode: 'rw-r--r--')
mconnectdatadir = join_paths(get_option('datadir'),
'mconnect')


+ 7
- 4
src/mconnect/application.vala View File

@ -53,12 +53,15 @@ namespace Mconn {
base.startup ();
if (log_debug_verbose == true) {
Logging.enable_vdebug ();
// enable debug logging when verbose is enabled
log_debug = true;
}
if (log_debug == true)
Environment.set_variable ("G_MESSAGES_DEBUG", "all", false);
if (log_debug_verbose == true)
Logging.enable_vdebug ();
core = Core.instance ();
if (core == null)
error ("cannot initialize core");
@ -112,4 +115,4 @@ namespace Mconn {
debug ("dbus unregister, path %s", object_path);
}
}
}
}

+ 4
- 11
src/mconnect/device-proxy.vala View File

@ -30,7 +30,6 @@ class DeviceDBusProxy : Object {
}
private set {
}
default = "";
}
public string name {
get {
@ -38,7 +37,6 @@ class DeviceDBusProxy : Object {
}
private set {
}
default = "";
}
public string device_type {
get {
@ -46,7 +44,6 @@ class DeviceDBusProxy : Object {
}
private set {
}
default = "";
}
public uint protocol_version {
get {
@ -54,7 +51,6 @@ class DeviceDBusProxy : Object {
}
private set {
}
default = 5;
}
public string address {
get; private set; default = "";
@ -66,7 +62,6 @@ class DeviceDBusProxy : Object {
}
private set {
}
default = false;
}
public bool allowed {
get {
@ -74,7 +69,6 @@ class DeviceDBusProxy : Object {
}
private set {
}
default = false;
}
public bool is_active {
get {
@ -82,10 +76,9 @@ class DeviceDBusProxy : Object {
}
private set {
}
default = false;
}
public bool is_connected {
get; private set; default = false;
get; private set;
}
public string[] incoming_capabilities {
@ -268,7 +261,7 @@ class DeviceDBusProxy : Object {
[DBus (visible = false)]
public void bus_register_handler (DBusConnection conn,
string cap,
PacketHandlerInterfaceProxy handler) {
PacketHandlerInterfaceProxy handler) throws Error {
handler.bus_register (conn, this.object_path);
this.handlers.@set (cap, handler);
@ -276,7 +269,7 @@ class DeviceDBusProxy : Object {
[DBus (visible = false)]
public void bus_unregister_handler (DBusConnection conn,
string cap) {
string cap) throws Error {
PacketHandlerInterfaceProxy handler;
this.handlers.@unset (cap, out handler);
@ -284,4 +277,4 @@ class DeviceDBusProxy : Object {
handler.bus_unregister (conn);
}
}
}
}

+ 11
- 13
src/mconnect/device.vala View File

@ -133,10 +133,9 @@ class Device : Object {
this.device_type = disc.device_type;
this.protocol_version = disc.protocol_version;
this.tcp_port = disc.tcp_port;
this.outgoing_capabilities = new ArrayList<string>.wrap (
disc.outgoing_capabilities);
this.incoming_capabilities = new ArrayList<string>.wrap (
disc.incoming_capabilities);
this.outgoing_capabilities = new ArrayList<string>.wrap (disc.outgoing_capabilities);
this.incoming_capabilities = new ArrayList<string>.wrap (disc.incoming_capabilities);
debug ("new device: %s", this.to_string ());
}
@ -177,12 +176,11 @@ class Device : Object {
throw e;
}
}
dev.outgoing_capabilities = new ArrayList<string>.wrap (
cache.get_string_list (name,
"outgoing_capabilities"));
dev.incoming_capabilities = new ArrayList<string>.wrap (
cache.get_string_list (name,
"incoming_capabilities"));
dev.outgoing_capabilities = new ArrayList<string>.wrap (cache.get_string_list (name,
"outgoing_capabilities"));
dev.incoming_capabilities = new ArrayList<string>.wrap (cache.get_string_list (name,
"incoming_capabilities"));
var host = new InetAddress.from_string (last_ip_str);
if (host == null) {
@ -193,7 +191,7 @@ class Device : Object {
dev.host = host;
return dev;
} catch (KeyFileError e) {
} catch (Error e) {
warning ("failed to load device data from cache: %s", e.message);
return null;
}
@ -617,7 +615,7 @@ class Device : Object {
public void send (Packet pkt) {
// TODO: queue messages
if (this._channel != null) {
_channel.send (pkt);
_channel.send.begin (pkt);
}
}
}
}

+ 4
- 3
src/mconnect/devicechannel.vala View File

@ -150,10 +150,11 @@ class DeviceChannel : Object {
var cert = Core.instance ().certificate;
// wrap with TLS
var tls_conn = Utils.make_tls_connection (this._sock_conn,
TlsConnection tls_conn;
try {
tls_conn = Utils.make_tls_connection (this._sock_conn,
cert,
expected_peer);
try {
info ("attempt TLS handshake");
var res = yield tls_conn.handshake_async ();
@ -298,4 +299,4 @@ class DeviceChannel : Object {
this.packet_received (pkt);
}
}
}
}

+ 10
- 6
src/mconnect/devicemanager-proxy.vala View File

@ -52,7 +52,7 @@ class DeviceManagerDBusProxy : Object {
}
[DBus (visible = false)]
public void publish () throws IOError {
public void publish () throws Error {
assert (this.bus != null);
this.bus.register_object (DBUS_PATH, this);
@ -64,7 +64,7 @@ class DeviceManagerDBusProxy : Object {
*
* Allow given device
*/
public void allow_device (string path) {
public void allow_device (string path) throws Error {
debug ("allow device %s", path);
var dev_proxy = this.devices.@get (path);
@ -83,7 +83,7 @@ class DeviceManagerDBusProxy : Object {
*
* Disallow given device
*/
public void disallow_device (string path) {
public void disallow_device (string path) throws Error {
debug ("disallow device %s", path);
var dev_proxy = this.devices.@get (path);
@ -101,7 +101,7 @@ class DeviceManagerDBusProxy : Object {
*
* Returns a list of DBus paths of all known devices
*/
public ObjectPath[] list_devices () {
public ObjectPath[] list_devices () throws Error {
ObjectPath[] devices = {};
foreach (var path in this.devices.keys) {
@ -155,7 +155,11 @@ class DeviceManagerDBusProxy : Object {
capability,
iface);
if (h != null) {
h.bus_register (this.bus, dp.object_path);
try {
h.bus_register (this.bus, dp.object_path);
} catch (Error e) {
warning ("cannot register handler at path %s: %s", dp.object_path, e.message);
}
}
}
@ -172,4 +176,4 @@ class DeviceManagerDBusProxy : Object {
return path;
}
}
}

+ 2
- 2
src/mconnect/discovery.vala View File

@ -36,7 +36,7 @@ class Discovery : GLib.Object {
SocketType.DATAGRAM,
SocketProtocol.UDP);
var sa = new InetSocketAddress (new InetAddress.any (SocketFamily.IPV4),
1714);
1716);
debug ("start listening for new devices at: %s:%u",
sa.address.to_string (), sa.port);
@ -93,4 +93,4 @@ class Discovery : GLib.Object {
device_found (dev);
}
}
}

+ 1
- 1
src/mconnect/logging.vala View File

@ -41,4 +41,4 @@ void vdebug (string format, ...) {
var l = va_list ();
logv (null, LogLevelFlags.LEVEL_DEBUG, format, l);
}
}
}

+ 6
- 6
src/mconnect/mpris-proxies.vala View File

@ -19,7 +19,7 @@
[DBus (name = "org.freedesktop.DBus")]
public interface DBusProxy : Object {
public abstract string[] list_names () throws IOError;
public abstract string[] list_names () throws Error;
public signal void name_owner_changed (string name, string old_owner, string new_owner);
}
@ -33,10 +33,10 @@ public interface DBusPropertiesProxy : Object {
[DBus (name = "org.mpris.MediaPlayer2.Player")]
public interface MprisPlayerProxy : Object {
public abstract void next () throws IOError;
public abstract void previous () throws IOError;
public abstract void play_pause () throws IOError;
public abstract void seek (int64 Offset) throws IOError;
public abstract void next () throws Error;
public abstract void previous () throws Error;
public abstract void play_pause () throws Error;
public abstract void seek (int64 Offset) throws Error;
public abstract string playback_status {
owned get;
@ -76,4 +76,4 @@ public interface MprisProxy : Object {
public abstract string identity {
owned get;
}
}
}

+ 5
- 4
src/mconnect/mpris.vala View File

@ -173,13 +173,14 @@ class MprisHandler : Object, PacketHandlerInterface {
prop.can_seek = mpris_player.can_seek;
update_status (make_player_prop_packet (player_id, prop));
}
} catch (IOError e) {
} catch (Error e) {
warning ("dbus communication failed: %s", e.message);
return;
}
}
private static void get_metadata_string (HashTable<string, Variant> metadata, string meta_what, out string where) {
where = "";
if (metadata.contains (meta_what) &&
metadata.get (meta_what).is_of_type (VariantType.STRING)) {
where = metadata.get (meta_what).get_string ();
@ -369,7 +370,7 @@ class MprisHandler : Object, PacketHandlerInterface {
add_player (bus_name);
}
}
} catch (IOError e) {
} catch (Error e) {
warning ("failed to get mpris player list: %s", e.message);
}
}
@ -396,7 +397,7 @@ class MprisHandler : Object, PacketHandlerInterface {
bus_name,
"/org/mpris/MediaPlayer2");
player_list.insert (mpris.identity, bus_name);
} catch (IOError e) {
} catch (Error e) {
warning ("failed to connect to mpris player: %s", e.message);
}
}
@ -414,4 +415,4 @@ class MprisHandler : Object, PacketHandlerInterface {
player_list.remove (key);
}
}
}
}

+ 3
- 3
src/mconnect/packethandlerinterface-proxy.vala View File

@ -20,6 +20,6 @@
* PacketHandlerInterfaceProxy: interface of DBus exported packet handler
*/
interface PacketHandlerInterfaceProxy : Object {
public abstract void bus_register (DBusConnection conn, string path) throws IOError;
public abstract void bus_unregister (DBusConnection conn) throws IOError;
}
public abstract void bus_register (DBusConnection conn, string path) throws Error;
public abstract void bus_unregister (DBusConnection conn) throws Error;
}

+ 6
- 6
src/mconnect/share-proxy.vala View File

@ -29,25 +29,25 @@ class ShareHandlerProxy : Object, PacketHandlerInterfaceProxy {
}
[DBus (visible = false)]
public void bus_register (DBusConnection conn, string path) throws IOError {
public void bus_register (DBusConnection conn, string path) throws Error {
conn.register_object (path, this);
}
[DBus (visible = false)]
public void bus_unregister (DBusConnection conn) throws IOError {
public void bus_unregister (DBusConnection conn) throws Error {
// conn.unregister_object(this);
}
public void share_file (string path) throws IOError {
public void share_file (string path) throws Error {
this.share_handler.share_file (this.device, path);
}
public void share_url (string url) throws IOError {
public void share_url (string url) throws Error {
debug ("share url %s", url);
this.share_handler.share_url (this.device, url);
}
public void share_text (string text) throws IOError {
public void share_text (string text) throws Error {
this.share_handler.share_text (this.device, text);
}
}
}

+ 7
- 3
src/mconnect/share.vala View File

@ -105,7 +105,11 @@ class ShareHandler : Object, PacketHandlerInterface {
debug ("got URL: %s, launching...", url);
Utils.show_own_notification ("Launching shared URL",
dev.device_name);
AppInfo.launch_default_for_uri (url, null);
try {
AppInfo.launch_default_for_uri (url, null);
} catch (Error e) {
warning ("cannot launch application: %s", e.message);
}
}
}
@ -161,7 +165,7 @@ class ShareHandler : Object, PacketHandlerInterface {
dev.send (make_share_packet ("text", text));
}
public void share_file (Device dev, string path) {
public void share_file (Device dev, string path) throws Error {
debug ("share file %s to device %s", path, dev.to_string ());
var file = File.new_for_path (path);
@ -206,4 +210,4 @@ class ShareHandler : Object, PacketHandlerInterface {
t.start_async.begin ();
dev.send (make_file_share_packet (file.get_basename (), size, port));
}
}
}

+ 2
- 2
src/mconnect/telephony-proxy.vala View File

@ -38,7 +38,7 @@ class TelephonyHandlerProxy : Object, PacketHandlerInterfaceProxy {
// conn.unregister_object(this);
}
public void send_sms (string number, string message) {
public void send_sms (string number, string message) throws Error {
this.telephony.send_sms (this.device, number, message);
}
}
}

+ 14
- 11
src/mconnect/transfer-download.vala View File

@ -69,13 +69,13 @@ class DownloadTransfer : TransferInterface, Object {
Utils.socket_set_keepalive (sock);
// enable TLS
this.tls_conn = Utils.make_tls_connection (this.conn,
Core.instance ().certificate,
this.device.certificate,
Utils.TlsConnectionMode.CLIENT);
try {
this.tls_conn = Utils.make_tls_connection (this.conn,
Core.instance ().certificate,
this.device.certificate,
Utils.TlsConnectionMode.CLIENT);
debug ("attempt TLS handshake");
var tls_res = yield this.tls_conn.handshake_async ();
yield this.tls_conn.handshake_async ();
debug ("TLS handshake complete");
} catch (Error e) {
@ -124,7 +124,7 @@ class DownloadTransfer : TransferInterface, Object {
if (this.foutstream != null) {
try {
this.foutstream.close ();
} catch (IOError e) {
} catch (Error e) {
warning ("failed to close file output: %s",
e.message);
}
@ -133,7 +133,7 @@ class DownloadTransfer : TransferInterface, Object {
if (this.tls_conn != null) {
try {
this.tls_conn.close ();
} catch (IOError e) {
} catch (Error e) {
warning ("failed to close TLS connection: %s",
e.message);
}
@ -141,7 +141,7 @@ class DownloadTransfer : TransferInterface, Object {
if (this.conn != null) {
try {
this.conn.close ();
} catch (IOError e) {
} catch (Error e) {
warning ("failed to close connection: %s",
e.message);
}
@ -155,8 +155,11 @@ class DownloadTransfer : TransferInterface, Object {
}
private void cleanup_error (string reason) {
this.file.@delete ();
try {
this.file.@delete ();
} catch (Error e) {
warning ("cannot remove file: %s", e.message);
}
this.cleanup ();
@ -184,4 +187,4 @@ class DownloadTransfer : TransferInterface, Object {
debug ("cancel called");
this.cancellable.cancel ();
}
}
}

+ 2
- 4
src/mconnect/transfer-manager-proxy.vala View File

@ -20,8 +20,6 @@ using Gee;
[DBus (name = "org.mconnect.TransferManager")]
class TransferManagerDBusProxy : Object {
private TransferManager manager;
private DBusConnection bus;
private int job_idx = 0;
@ -49,7 +47,7 @@ class TransferManagerDBusProxy : Object {
*
* Returns a list of DBus paths of all known transfer jobs
*/
public ObjectPath[] list_jobs () {
public ObjectPath[] list_jobs () throws Error {
ObjectPath[] jobs = {};
foreach (var path in this.jobs.keys) {
@ -108,4 +106,4 @@ class TransferManagerDBusProxy : Object {
public signal void transfer_failed (string path, string reason);
public signal void transfer_started (string path);
}
}

+ 2
- 1
src/mconnect/transfer-manager.vala View File

@ -32,6 +32,7 @@ class TransferManager : Object {
}
public SocketService ? make_listener (out uint16 listen_port) {
listen_port = 0;
var ss = new SocketService ();
for (var port = PORT_MIN; port <= PORT_MAX; port++) {
var added = false;
@ -52,4 +53,4 @@ class TransferManager : Object {
warning ("could not find a free port to listen on");
return null;
}
}
}

+ 4
- 4
src/mconnect/transfer-proxy.vala View File

@ -34,21 +34,21 @@ class TransferDBusProxy : Object {
}
[DBus (visible = false)]
public void bus_register (DBusConnection conn) {
public void bus_register (DBusConnection conn) throws Error {
debug ("register transfer at path %s", this.object_path.to_string ());
this.register_id = conn.register_object (this.object_path, this);
}
[DBus (visible = false)]
public void bus_unregister (DBusConnection conn) {
public void bus_unregister (DBusConnection conn) throws Error {
if (this.register_id != 0) {
debug ("unregister transfer at path %s", this.object_path.to_string ());
conn.unregister_object (this.register_id);
}
}
public void cancel () {
public void cancel () throws Error {
debug ("cancelling job");
this.transfer.cancel ();
}
}
}

+ 9
- 3
src/mconnect/transfer-upload.vala View File

@ -71,7 +71,13 @@ class UploadTransfer : TransferInterface, Object {
}
private async void handle_client (SocketConnection conn) {
var isa = conn.get_remote_address () as InetSocketAddress;
InetSocketAddress isa;
try {
isa = conn.get_remote_address () as InetSocketAddress;
} catch (Error e) {
warning ("cannot obtain remote address: %s", e.message);
return;
}
debug ("client connected: %s:%u", isa.address.to_string (),
isa.port);
@ -87,7 +93,7 @@ class UploadTransfer : TransferInterface, Object {
Utils.TlsConnectionMode.SERVER);
try {
debug ("attempt TLS handshake");
var tls_res = yield this.tls_conn.handshake_async ();
yield this.tls_conn.handshake_async ();
debug ("TLS handshake complete");
} catch (Error e) {
@ -183,4 +189,4 @@ class UploadTransfer : TransferInterface, Object {
debug ("cancel called");
this.cancellable.cancel ();
}
}
}

+ 3
- 4
src/mconnect/utils.vala View File

@ -70,7 +70,6 @@ namespace Utils {
option = 3;
Posix.setsockopt (sock.fd, 6, 6, &option, (Posix.socklen_t) sizeof (int));
#endif
int option = 10;
Posix.setsockopt (sock.fd, IPProto.TCP,
Posix.TCP_KEEPIDLE,
@ -109,7 +108,7 @@ namespace Utils {
TlsConnection make_tls_connection (SocketConnection sock_conn,
TlsCertificate self_cert,
TlsCertificate ? expected_peer = null,
TlsConnectionMode mode = TlsConnectionMode.SERVER) {
TlsConnectionMode mode = TlsConnectionMode.SERVER) throws Error {
TlsConnection tls_conn;
if (mode == TlsConnectionMode.SERVER) {
@ -183,7 +182,7 @@ namespace Utils {
return matches;
} catch (RegexError e) {
warning ("failed to compile regex: %s", e.message);
return null;
return {};
}
}
@ -198,4 +197,4 @@ namespace Utils {
critical ("failed to show notification: %s", e.message);
}
}
}
}

+ 3
- 3
src/mconnectctl/device-manager-iface.vala View File

@ -22,7 +22,7 @@ namespace Mconnect {
public const string OBJECT_PATH = "/org/mconnect/manager";
public abstract ObjectPath[] ListDevices () throws IOError;
public abstract void AllowDevice (string path) throws IOError;
public abstract ObjectPath[] ListDevices () throws Error;
public abstract void AllowDevice (string path) throws Error;
}
}
}

+ 4
- 4
src/mconnectctl/share-iface.vala View File

@ -21,8 +21,8 @@ namespace Mconnect {
[DBus (name = "org.mconnect.Device.Share")]
public interface ShareIface : Object {
public abstract void share_url (string url) throws IOError;
public abstract void share_text (string text) throws IOError;
public abstract void share_file (string path) throws IOError;
public abstract void share_url (string url) throws Error;
public abstract void share_text (string text) throws Error;
public abstract void share_file (string path) throws Error;
}
}
}

+ 2
- 2
src/mconnectctl/telephony-iface.vala View File

@ -22,6 +22,6 @@ namespace Mconnect {
public interface TelephonyIface : Object {
public abstract void send_sms (string number,
string message) throws IOError;
string message) throws Error;
}
}
}

+ 2
- 3
test/mconn-crypt-vala-test.vala View File

@ -31,8 +31,7 @@ void test_generate_load () {
}
try {
var cert = new TlsCertificate.from_files (cert_path,
key_path);
new TlsCertificate.from_files (cert_path, key_path);
} catch (Error e) {
warning ("load from files failed: %s", e.message);
Test.fail ();
@ -129,4 +128,4 @@ public static void main (string[] args) {
Test.add_func ("/mconn-crypt-vala/verify-cn", test_custom_cn);
Test.add_func ("/mconn-crypt-vala/fingerprint", test_fingerprint);
Test.run ();
}
}

Loading…
Cancel
Save