diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-11-16 23:46:36 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-11-16 23:46:36 +0900 |
| commit | a8c6d0ed9023f7e0699cfe5c519532231e49cc3b (patch) | |
| tree | 8e467523af5af939ebd6362636c9ba86909b889b /src/web/app/common/scripts | |
| parent | Fix indentation (diff) | |
| download | sharkey-a8c6d0ed9023f7e0699cfe5c519532231e49cc3b.tar.gz sharkey-a8c6d0ed9023f7e0699cfe5c519532231e49cc3b.tar.bz2 sharkey-a8c6d0ed9023f7e0699cfe5c519532231e49cc3b.zip | |
#465
Diffstat (limited to 'src/web/app/common/scripts')
| -rw-r--r-- | src/web/app/common/scripts/drive-stream-manager.ts | 20 | ||||
| -rw-r--r-- | src/web/app/common/scripts/drive-stream.ts | 14 |
2 files changed, 34 insertions, 0 deletions
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<Connection> { + 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; |