// Code generated by counterfeiter. DO NOT EDIT.
package typesfakes

import (
	"sync"

	"github.com/livekit/livekit-server/pkg/rtc/types"
	"github.com/livekit/protocol/livekit"
)

type FakeDataDownTrack struct {
	CloseStub        func()
	closeMutex       sync.RWMutex
	closeArgsForCall []struct {
	}
	HandleStub        func() uint16
	handleMutex       sync.RWMutex
	handleArgsForCall []struct {
	}
	handleReturns struct {
		result1 uint16
	}
	handleReturnsOnCall map[int]struct {
		result1 uint16
	}
	OnCloseStub        func(func())
	onCloseMutex       sync.RWMutex
	onCloseArgsForCall []struct {
		arg1 func()
	}
	PublishDataTrackStub        func() types.DataTrack
	publishDataTrackMutex       sync.RWMutex
	publishDataTrackArgsForCall []struct {
	}
	publishDataTrackReturns struct {
		result1 types.DataTrack
	}
	publishDataTrackReturnsOnCall map[int]struct {
		result1 types.DataTrack
	}
	UpdateSubscriptionOptionsStub        func(*livekit.DataTrackSubscriptionOptions)
	updateSubscriptionOptionsMutex       sync.RWMutex
	updateSubscriptionOptionsArgsForCall []struct {
		arg1 *livekit.DataTrackSubscriptionOptions
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDataDownTrack) Close() {
	fake.closeMutex.Lock()
	fake.closeArgsForCall = append(fake.closeArgsForCall, struct {
	}{})
	stub := fake.CloseStub
	fake.recordInvocation("Close", []interface{}{})
	fake.closeMutex.Unlock()
	if stub != nil {
		fake.CloseStub()
	}
}

func (fake *FakeDataDownTrack) CloseCallCount() int {
	fake.closeMutex.RLock()
	defer fake.closeMutex.RUnlock()
	return len(fake.closeArgsForCall)
}

func (fake *FakeDataDownTrack) CloseCalls(stub func()) {
	fake.closeMutex.Lock()
	defer fake.closeMutex.Unlock()
	fake.CloseStub = stub
}

func (fake *FakeDataDownTrack) Handle() uint16 {
	fake.handleMutex.Lock()
	ret, specificReturn := fake.handleReturnsOnCall[len(fake.handleArgsForCall)]
	fake.handleArgsForCall = append(fake.handleArgsForCall, struct {
	}{})
	stub := fake.HandleStub
	fakeReturns := fake.handleReturns
	fake.recordInvocation("Handle", []interface{}{})
	fake.handleMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataDownTrack) HandleCallCount() int {
	fake.handleMutex.RLock()
	defer fake.handleMutex.RUnlock()
	return len(fake.handleArgsForCall)
}

func (fake *FakeDataDownTrack) HandleCalls(stub func() uint16) {
	fake.handleMutex.Lock()
	defer fake.handleMutex.Unlock()
	fake.HandleStub = stub
}

func (fake *FakeDataDownTrack) HandleReturns(result1 uint16) {
	fake.handleMutex.Lock()
	defer fake.handleMutex.Unlock()
	fake.HandleStub = nil
	fake.handleReturns = struct {
		result1 uint16
	}{result1}
}

func (fake *FakeDataDownTrack) HandleReturnsOnCall(i int, result1 uint16) {
	fake.handleMutex.Lock()
	defer fake.handleMutex.Unlock()
	fake.HandleStub = nil
	if fake.handleReturnsOnCall == nil {
		fake.handleReturnsOnCall = make(map[int]struct {
			result1 uint16
		})
	}
	fake.handleReturnsOnCall[i] = struct {
		result1 uint16
	}{result1}
}

func (fake *FakeDataDownTrack) OnClose(arg1 func()) {
	fake.onCloseMutex.Lock()
	fake.onCloseArgsForCall = append(fake.onCloseArgsForCall, struct {
		arg1 func()
	}{arg1})
	stub := fake.OnCloseStub
	fake.recordInvocation("OnClose", []interface{}{arg1})
	fake.onCloseMutex.Unlock()
	if stub != nil {
		fake.OnCloseStub(arg1)
	}
}

func (fake *FakeDataDownTrack) OnCloseCallCount() int {
	fake.onCloseMutex.RLock()
	defer fake.onCloseMutex.RUnlock()
	return len(fake.onCloseArgsForCall)
}

func (fake *FakeDataDownTrack) OnCloseCalls(stub func(func())) {
	fake.onCloseMutex.Lock()
	defer fake.onCloseMutex.Unlock()
	fake.OnCloseStub = stub
}

func (fake *FakeDataDownTrack) OnCloseArgsForCall(i int) func() {
	fake.onCloseMutex.RLock()
	defer fake.onCloseMutex.RUnlock()
	argsForCall := fake.onCloseArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDataDownTrack) PublishDataTrack() types.DataTrack {
	fake.publishDataTrackMutex.Lock()
	ret, specificReturn := fake.publishDataTrackReturnsOnCall[len(fake.publishDataTrackArgsForCall)]
	fake.publishDataTrackArgsForCall = append(fake.publishDataTrackArgsForCall, struct {
	}{})
	stub := fake.PublishDataTrackStub
	fakeReturns := fake.publishDataTrackReturns
	fake.recordInvocation("PublishDataTrack", []interface{}{})
	fake.publishDataTrackMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataDownTrack) PublishDataTrackCallCount() int {
	fake.publishDataTrackMutex.RLock()
	defer fake.publishDataTrackMutex.RUnlock()
	return len(fake.publishDataTrackArgsForCall)
}

func (fake *FakeDataDownTrack) PublishDataTrackCalls(stub func() types.DataTrack) {
	fake.publishDataTrackMutex.Lock()
	defer fake.publishDataTrackMutex.Unlock()
	fake.PublishDataTrackStub = stub
}

func (fake *FakeDataDownTrack) PublishDataTrackReturns(result1 types.DataTrack) {
	fake.publishDataTrackMutex.Lock()
	defer fake.publishDataTrackMutex.Unlock()
	fake.PublishDataTrackStub = nil
	fake.publishDataTrackReturns = struct {
		result1 types.DataTrack
	}{result1}
}

func (fake *FakeDataDownTrack) PublishDataTrackReturnsOnCall(i int, result1 types.DataTrack) {
	fake.publishDataTrackMutex.Lock()
	defer fake.publishDataTrackMutex.Unlock()
	fake.PublishDataTrackStub = nil
	if fake.publishDataTrackReturnsOnCall == nil {
		fake.publishDataTrackReturnsOnCall = make(map[int]struct {
			result1 types.DataTrack
		})
	}
	fake.publishDataTrackReturnsOnCall[i] = struct {
		result1 types.DataTrack
	}{result1}
}

func (fake *FakeDataDownTrack) UpdateSubscriptionOptions(arg1 *livekit.DataTrackSubscriptionOptions) {
	fake.updateSubscriptionOptionsMutex.Lock()
	fake.updateSubscriptionOptionsArgsForCall = append(fake.updateSubscriptionOptionsArgsForCall, struct {
		arg1 *livekit.DataTrackSubscriptionOptions
	}{arg1})
	stub := fake.UpdateSubscriptionOptionsStub
	fake.recordInvocation("UpdateSubscriptionOptions", []interface{}{arg1})
	fake.updateSubscriptionOptionsMutex.Unlock()
	if stub != nil {
		fake.UpdateSubscriptionOptionsStub(arg1)
	}
}

func (fake *FakeDataDownTrack) UpdateSubscriptionOptionsCallCount() int {
	fake.updateSubscriptionOptionsMutex.RLock()
	defer fake.updateSubscriptionOptionsMutex.RUnlock()
	return len(fake.updateSubscriptionOptionsArgsForCall)
}

func (fake *FakeDataDownTrack) UpdateSubscriptionOptionsCalls(stub func(*livekit.DataTrackSubscriptionOptions)) {
	fake.updateSubscriptionOptionsMutex.Lock()
	defer fake.updateSubscriptionOptionsMutex.Unlock()
	fake.UpdateSubscriptionOptionsStub = stub
}

func (fake *FakeDataDownTrack) UpdateSubscriptionOptionsArgsForCall(i int) *livekit.DataTrackSubscriptionOptions {
	fake.updateSubscriptionOptionsMutex.RLock()
	defer fake.updateSubscriptionOptionsMutex.RUnlock()
	argsForCall := fake.updateSubscriptionOptionsArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDataDownTrack) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeDataDownTrack) recordInvocation(key string, args []interface{}) {
	fake.invocationsMutex.Lock()
	defer fake.invocationsMutex.Unlock()
	if fake.invocations == nil {
		fake.invocations = map[string][][]interface{}{}
	}
	if fake.invocations[key] == nil {
		fake.invocations[key] = [][]interface{}{}
	}
	fake.invocations[key] = append(fake.invocations[key], args)
}

var _ types.DataDownTrack = new(FakeDataDownTrack)
