From a8c6d0ed9023f7e0699cfe5c519532231e49cc3b Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 16 Nov 2017 23:46:36 +0900 Subject: #465 --- src/web/app/common/scripts/drive-stream-manager.ts | 20 ++++++++++++++++++++ src/web/app/common/scripts/drive-stream.ts | 14 ++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/web/app/common/scripts/drive-stream-manager.ts create mode 100644 src/web/app/common/scripts/drive-stream.ts (limited to 'src/web/app/common/scripts') diff --git a/src/web/app/common/scripts/drive-stream-manager.ts b/src/web/app/common/scripts/drive-stream-manager.ts new file mode 100644 index 0000000000..8acdd7cbba --- /dev/null +++ b/src/web/app/common/scripts/drive-stream-manager.ts @@ -0,0 +1,20 @@ +import StreamManager from './stream-manager'; +import Connection from './drive-stream'; + +export default class DriveStreamManager extends StreamManager { + private me; + + constructor(me) { + super(); + + this.me = me; + } + + public getConnection() { + if (this.connection == null) { + this.connection = new Connection(this.me); + } + + return this.connection; + } +} diff --git a/src/web/app/common/scripts/drive-stream.ts b/src/web/app/common/scripts/drive-stream.ts new file mode 100644 index 0000000000..1b33435578 --- /dev/null +++ b/src/web/app/common/scripts/drive-stream.ts @@ -0,0 +1,14 @@ +import Stream from './stream'; + +/** + * Drive stream connection + */ +class Connection extends Stream { + constructor(me) { + super('drive', { + i: me.token + }); + } +} + +export default Connection; -- cgit v1.2.3-freya