This commit is contained in:
20
src/web/app/common/scripts/drive-stream-manager.ts
Normal file
20
src/web/app/common/scripts/drive-stream-manager.ts
Normal file
@@ -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;
|
||||
}
|
||||
}
|
14
src/web/app/common/scripts/drive-stream.ts
Normal file
14
src/web/app/common/scripts/drive-stream.ts
Normal file
@@ -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;
|
Reference in New Issue
Block a user