Skip to content

Commit

Permalink
rename xxxInterface.ts to xxxTypes.ts and suffix classes with "Impl"
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Nov 8, 2024
1 parent 52eeb36 commit 0a203d0
Show file tree
Hide file tree
Showing 39 changed files with 192 additions and 182 deletions.
10 changes: 5 additions & 5 deletions node/src/ActiveSpeakerObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
ActiveSpeakerObserverEvents,
ActiveSpeakerObserverObserver,
ActiveSpeakerObserverObserverEvents,
} from './ActiveSpeakerObserverInterface';
import { RtpObserverInterface } from './RtpObserverInterface';
import { RtpObserver, RtpObserverConstructorOptions } from './RtpObserver';
} from './ActiveSpeakerObserverTypes';
import { RtpObserverInterface } from './RtpObserverTypes';
import { RtpObserverImpl, RtpObserverConstructorOptions } from './RtpObserver';
import { AppData } from './types';
import { Event, Notification } from './fbs/notification';
import * as FbsActiveSpeakerObserver from './fbs/active-speaker-observer';
Expand All @@ -18,10 +18,10 @@ type RtpObserverObserverConstructorOptions<ActiveSpeakerObserverAppData> =

const logger = new Logger('ActiveSpeakerObserver');

export class ActiveSpeakerObserver<
export class ActiveSpeakerObserverImpl<
ActiveSpeakerObserverAppData extends AppData = AppData,
>
extends RtpObserver<
extends RtpObserverImpl<
ActiveSpeakerObserverAppData,
ActiveSpeakerObserverEvents,
ActiveSpeakerObserverObserver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
RtpObserverInterface,
RtpObserverEvents,
RtpObserverObserverEvents,
} from './RtpObserverInterface';
import { ProducerInterface } from './ProducerInterface';
} from './RtpObserverTypes';
import { ProducerInterface } from './ProducerTypes';
import { AppData } from './types';

export type ActiveSpeakerObserverOptions<
Expand Down
12 changes: 6 additions & 6 deletions node/src/AudioLevelObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {
AudioLevelObserverEvents,
AudioLevelObserverObserver,
AudioLevelObserverObserverEvents,
} from './AudioLevelObserverInterface';
import { RtpObserverInterface } from './RtpObserverInterface';
import { RtpObserver, RtpObserverConstructorOptions } from './RtpObserver';
import { ProducerInterface } from './ProducerInterface';
} from './AudioLevelObserverTypes';
import { RtpObserverInterface } from './RtpObserverTypes';
import { RtpObserverImpl, RtpObserverConstructorOptions } from './RtpObserver';
import { ProducerInterface } from './ProducerTypes';
import { AppData } from './types';
import * as utils from './utils';
import { Event, Notification } from './fbs/notification';
Expand All @@ -20,10 +20,10 @@ type AudioLevelObserverConstructorOptions<AudioLevelObserverAppData> =

const logger = new Logger('AudioLevelObserver');

export class AudioLevelObserver<
export class AudioLevelObserverImpl<
AudioLevelObserverAppData extends AppData = AppData,
>
extends RtpObserver<
extends RtpObserverImpl<
AudioLevelObserverAppData,
AudioLevelObserverEvents,
AudioLevelObserverObserver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
RtpObserverInterface,
RtpObserverEvents,
RtpObserverObserverEvents,
} from './RtpObserverInterface';
import { ProducerInterface } from './ProducerInterface';
} from './RtpObserverTypes';
import { ProducerInterface } from './ProducerTypes';
import { AppData } from './types';

export type AudioLevelObserverOptions<
Expand Down
6 changes: 3 additions & 3 deletions node/src/Consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import {
ConsumerEvents,
ConsumerObserver,
ConsumerObserverEvents,
} from './ConsumerInterface';
} from './ConsumerTypes';
import { Channel } from './Channel';
import { TransportInternal } from './Transport';
import { ProducerStat } from './ProducerInterface';
import { ProducerStat } from './ProducerTypes';
import {
MediaKind,
RtpParameters,
Expand Down Expand Up @@ -58,7 +58,7 @@ type ConsumerData = {

const logger = new Logger('Consumer');

export class Consumer<ConsumerAppData extends AppData = AppData>
export class ConsumerImpl<ConsumerAppData extends AppData = AppData>
extends EnhancedEventEmitter<ConsumerEvents>
implements ConsumerInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EnhancedEventEmitter } from './enhancedEvents';
import { ProducerStat } from './ProducerInterface';
import { ProducerStat } from './ProducerTypes';
import {
MediaKind,
RtpCapabilities,
Expand Down
4 changes: 2 additions & 2 deletions node/src/DataConsumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
DataConsumerEvents,
DataConsumerObserver,
DataConsumerObserverEvents,
} from './DataConsumerInterface';
} from './DataConsumerTypes';
import { Channel } from './Channel';
import { TransportInternal } from './Transport';
import {
Expand Down Expand Up @@ -38,7 +38,7 @@ type DataConsumerData = {

const logger = new Logger('DataConsumer');

export class DataConsumer<DataConsumerAppData extends AppData = AppData>
export class DataConsumerImpl<DataConsumerAppData extends AppData = AppData>
extends EnhancedEventEmitter<DataConsumerEvents>
implements DataConsumerInterface
{
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions node/src/DataProducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
DataProducerEvents,
DataProducerObserver,
DataProducerObserverEvents,
} from './DataProducerInterface';
} from './DataProducerTypes';
import { Channel } from './Channel';
import { TransportInternal } from './Transport';
import {
Expand All @@ -34,7 +34,7 @@ type DataProducerData = {

const logger = new Logger('DataProducer');

export class DataProducer<DataProducerAppData extends AppData = AppData>
export class DataProducerImpl<DataProducerAppData extends AppData = AppData>
extends EnhancedEventEmitter<DataProducerEvents>
implements DataProducerInterface
{
Expand Down
File renamed without changes.
12 changes: 7 additions & 5 deletions node/src/DirectTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import {
DirectTransportEvents,
DirectTransportObserver,
DirectTransportObserverEvents,
} from './DirectTransportInterface';
import { TransportInterface, BaseTransportDump } from './TransportInterface';
} from './DirectTransportTypes';
import { TransportInterface, BaseTransportDump } from './TransportTypes';
import {
Transport,
TransportImpl,
TransportConstructorOptions,
parseBaseTransportDump,
parseBaseTransportStats,
Expand All @@ -36,8 +36,10 @@ export type DirectTransportData = {

const logger = new Logger('DirectTransport');

export class DirectTransport<DirectTransportAppData extends AppData = AppData>
extends Transport<
export class DirectTransportImpl<
DirectTransportAppData extends AppData = AppData,
>
extends TransportImpl<
DirectTransportAppData,
DirectTransportEvents,
DirectTransportObserver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
BaseTransportStats,
TransportEvents,
TransportObserverEvents,
} from './TransportInterface';
} from './TransportTypes';
import { AppData } from './types';

export type DirectTransportOptions<
Expand Down
16 changes: 8 additions & 8 deletions node/src/PipeTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ import {
PipeTransportEvents,
PipeTransportObserver,
PipeTransportObserverEvents,
} from './PipeTransportInterface';
} from './PipeTransportTypes';
import {
TransportInterface,
TransportTuple,
SctpState,
} from './TransportInterface';
} from './TransportTypes';
import {
Transport,
TransportImpl,
TransportConstructorOptions,
parseBaseTransportDump,
parseBaseTransportStats,
parseSctpState,
parseTuple,
parseTransportTraceEventData,
} from './Transport';
import { ProducerInterface } from './ProducerInterface';
import { ConsumerInterface, ConsumerType } from './ConsumerInterface';
import { Consumer } from './Consumer';
import { ProducerInterface } from './ProducerTypes';
import { ConsumerInterface, ConsumerType } from './ConsumerTypes';
import { ConsumerImpl } from './Consumer';
import {
RtpParameters,
serializeRtpEncodingParameters,
Expand Down Expand Up @@ -64,7 +64,7 @@ export type PipeTransportData = {
const logger = new Logger('PipeTransport');

export class PipeTransport<PipeTransportAppData extends AppData = AppData>
extends Transport<
extends TransportImpl<
PipeTransportAppData,
PipeTransportEvents,
PipeTransportObserver
Expand Down Expand Up @@ -317,7 +317,7 @@ export class PipeTransport<PipeTransportAppData extends AppData = AppData>
type: 'pipe' as ConsumerType,
};

const consumer: ConsumerInterface<ConsumerAppData> = new Consumer({
const consumer: ConsumerInterface<ConsumerAppData> = new ConsumerImpl({
internal: {
...this.internal,
consumerId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
BaseTransportStats,
TransportEvents,
TransportObserverEvents,
} from './TransportInterface';
import { ConsumerInterface } from './ConsumerInterface';
} from './TransportTypes';
import { ConsumerInterface } from './ConsumerTypes';
import { SrtpParameters } from './SrtpParameters';
import { SctpParameters, NumSctpStreams } from './SctpParameters';
import { Either, AppData } from './types';
Expand Down
10 changes: 5 additions & 5 deletions node/src/PlainTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import {
PlainTransportEvents,
PlainTransportObserver,
PlainTransportObserverEvents,
} from './PlainTransportInterface';
} from './PlainTransportTypes';
import {
TransportInterface,
TransportTuple,
SctpState,
} from './TransportInterface';
} from './TransportTypes';
import {
Transport,
TransportImpl,
TransportConstructorOptions,
parseSctpState,
parseTuple,
Expand Down Expand Up @@ -52,8 +52,8 @@ export type PlainTransportData = {

const logger = new Logger('PlainTransport');

export class PlainTransport<PlainTransportAppData extends AppData = AppData>
extends Transport<
export class PlainTransportImpl<PlainTransportAppData extends AppData = AppData>
extends TransportImpl<
PlainTransportAppData,
PlainTransportEvents,
PlainTransportObserver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
BaseTransportStats,
TransportEvents,
TransportObserverEvents,
} from './TransportInterface';
} from './TransportTypes';
import { SrtpParameters, SrtpCryptoSuite } from './SrtpParameters';
import { SctpParameters, NumSctpStreams } from './SctpParameters';
import { Either, AppData } from './types';
Expand Down
4 changes: 2 additions & 2 deletions node/src/Producer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
ProducerEvents,
ProducerObserver,
ProducerObserverEvents,
} from './ProducerInterface';
} from './ProducerTypes';
import { Channel } from './Channel';
import { TransportInternal } from './Transport';
import { MediaKind, RtpParameters, parseRtpParameters } from './RtpParameters';
Expand Down Expand Up @@ -41,7 +41,7 @@ type ProducerData = {
consumableRtpParameters: RtpParameters;
};

export class Producer<ProducerAppData extends AppData = AppData>
export class ProducerImpl<ProducerAppData extends AppData = AppData>
extends EnhancedEventEmitter<ProducerEvents>
implements ProducerInterface
{
Expand Down
File renamed without changes.
Loading

0 comments on commit 0a203d0

Please sign in to comment.