~abreu-alexandre/unity-webapps-qml/content-hub-getpeers-failure-14-10

« back to all changes in this revision

Viewing changes to src/Ubuntu/UnityWebApps/bindings/online-accounts/backend/online-accounts.js

  • Committer: Alexandre Abreu
  • Date: 2014-05-09 13:17:09 UTC
  • mto: This revision was merged to the branch mainline in revision 116.
  • Revision ID: alexandre.abreu@canonical.com-20140509131709-6g9z2qqjgrks9wj6
add filtering param to getProviders

Show diffs side-by-side

added added

removed removed

Lines of Context:
320
320
    };
321
321
 
322
322
 
323
 
    function ProviderModel() {
 
323
    function ProviderModel(filterParams) {
324
324
        var result = backendDelegate.createQmlObject(
325
 
                    PLUGIN_URI, VERSION, 'ProviderModel');
 
325
                    PLUGIN_URI, VERSION, 'ProviderModel', filterParams);
326
326
        this._id = result.id;
327
327
        this._object = result.object;
328
328
 
626
626
            callback(accounts);
627
627
        },
628
628
 
629
 
        getProviders: function(callback) {
630
 
            var providerModel = new ProviderModel();
 
629
        getProviders: function(filters, callback) {
 
630
            var providerModel = new ProviderModel(filters);
631
631
            var count = providerModel.internal.count(providerModel);
632
632
            var providers = []
633
633
            for (var i = 0; i < count; ++i) {