From eb392b125105f9949f84a6fd654694238457a18f Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 11 Jul 2018 09:36:30 +0900 Subject: wip --- .../common/scripts/streaming/hybrid-timeline.ts | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/client/app/common/scripts/streaming/hybrid-timeline.ts (limited to 'src/client/app/common/scripts') diff --git a/src/client/app/common/scripts/streaming/hybrid-timeline.ts b/src/client/app/common/scripts/streaming/hybrid-timeline.ts new file mode 100644 index 0000000000..cd290797c4 --- /dev/null +++ b/src/client/app/common/scripts/streaming/hybrid-timeline.ts @@ -0,0 +1,34 @@ +import Stream from './stream'; +import StreamManager from './stream-manager'; +import MiOS from '../../../mios'; + +/** + * Hybrid timeline stream connection + */ +export class HybridTimelineStream extends Stream { + constructor(os: MiOS, me) { + super(os, 'hybrid-timeline', { + i: me.token + }); + } +} + +export class HybridTimelineStreamManager extends StreamManager { + private me; + private os: MiOS; + + constructor(os: MiOS, me) { + super(); + + this.me = me; + this.os = os; + } + + public getConnection() { + if (this.connection == null) { + this.connection = new HybridTimelineStream(this.os, this.me); + } + + return this.connection; + } +} -- cgit v1.2.3-freya