eagleoneraptor

Untitled

Apr 26th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Goa = imports.gi.Goa;
  2.  
  3. let client = Goa.Client.new_sync(null);
  4. let accounts = client.get_accounts();
  5. for (let i in accounts) {
  6.     //Now account is a instance of org.gnome.OnlineAccounts.Account
  7.     //DBus interface (GoaAccountProxy instance)
  8.     let account = accounts[i].get_account();
  9.    
  10.     //Getting a property does not work since it wasn't injected with
  11.     //the convenience DBus binding from Gio.js.
  12.     //print(account.ProviderName);
  13.  
  14.     //I need to do something like
  15.     print(account.get_cached_property("ProviderName").deep_unpack());
  16. }
Advertisement
Add Comment
Please, Sign In to add comment