summaryrefslogtreecommitdiffstats
path: root/toolkit/components/satchel/megalist/aggregator/DefaultAggregator.sys.mjs
blob: cf3a78a6a4a0d893bb13be39faa92624b7e8dcdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import { Aggregator } from "resource://gre/modules/megalist/aggregator/Aggregator.sys.mjs";
import { AddressesDataSource } from "resource://gre/modules/megalist/aggregator/datasources/AddressesDataSource.sys.mjs";
import { BankCardDataSource } from "resource://gre/modules/megalist/aggregator/datasources/BankCardDataSource.sys.mjs";
import { LoginDataSource } from "resource://gre/modules/megalist/aggregator/datasources/LoginDataSource.sys.mjs";

export class DefaultAggregator extends Aggregator {
  constructor() {
    super();
    this.addSource(aggregatorApi => new AddressesDataSource(aggregatorApi));
    this.addSource(aggregatorApi => new BankCardDataSource(aggregatorApi));
    this.addSource(aggregatorApi => new LoginDataSource(aggregatorApi));
  }
}