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

import (
	"sync"

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

type FakeDataTrack struct {
	AddDataDownTrackStub        func(types.DataTrackSender) error
	addDataDownTrackMutex       sync.RWMutex
	addDataDownTrackArgsForCall []struct {
		arg1 types.DataTrackSender
	}
	addDataDownTrackReturns struct {
		result1 error
	}
	addDataDownTrackReturnsOnCall map[int]struct {
		result1 error
	}
	AddSubscriberStub        func(types.LocalParticipant) (types.DataDownTrack, error)
	addSubscriberMutex       sync.RWMutex
	addSubscriberArgsForCall []struct {
		arg1 types.LocalParticipant
	}
	addSubscriberReturns struct {
		result1 types.DataDownTrack
		result2 error
	}
	addSubscriberReturnsOnCall map[int]struct {
		result1 types.DataDownTrack
		result2 error
	}
	CloseStub        func()
	closeMutex       sync.RWMutex
	closeArgsForCall []struct {
	}
	DeleteDataDownTrackStub        func(livekit.ParticipantID)
	deleteDataDownTrackMutex       sync.RWMutex
	deleteDataDownTrackArgsForCall []struct {
		arg1 livekit.ParticipantID
	}
	HandlePacketStub        func([]byte, *datatrack.Packet)
	handlePacketMutex       sync.RWMutex
	handlePacketArgsForCall []struct {
		arg1 []byte
		arg2 *datatrack.Packet
	}
	IDStub        func() livekit.TrackID
	iDMutex       sync.RWMutex
	iDArgsForCall []struct {
	}
	iDReturns struct {
		result1 livekit.TrackID
	}
	iDReturnsOnCall map[int]struct {
		result1 livekit.TrackID
	}
	IsSubscriberStub        func(livekit.ParticipantID) bool
	isSubscriberMutex       sync.RWMutex
	isSubscriberArgsForCall []struct {
		arg1 livekit.ParticipantID
	}
	isSubscriberReturns struct {
		result1 bool
	}
	isSubscriberReturnsOnCall map[int]struct {
		result1 bool
	}
	NameStub        func() string
	nameMutex       sync.RWMutex
	nameArgsForCall []struct {
	}
	nameReturns struct {
		result1 string
	}
	nameReturnsOnCall map[int]struct {
		result1 string
	}
	PubHandleStub        func() uint16
	pubHandleMutex       sync.RWMutex
	pubHandleArgsForCall []struct {
	}
	pubHandleReturns struct {
		result1 uint16
	}
	pubHandleReturnsOnCall map[int]struct {
		result1 uint16
	}
	RemoveSubscriberStub        func(livekit.ParticipantID)
	removeSubscriberMutex       sync.RWMutex
	removeSubscriberArgsForCall []struct {
		arg1 livekit.ParticipantID
	}
	ToProtoStub        func() *livekit.DataTrackInfo
	toProtoMutex       sync.RWMutex
	toProtoArgsForCall []struct {
	}
	toProtoReturns struct {
		result1 *livekit.DataTrackInfo
	}
	toProtoReturnsOnCall map[int]struct {
		result1 *livekit.DataTrackInfo
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDataTrack) AddDataDownTrack(arg1 types.DataTrackSender) error {
	fake.addDataDownTrackMutex.Lock()
	ret, specificReturn := fake.addDataDownTrackReturnsOnCall[len(fake.addDataDownTrackArgsForCall)]
	fake.addDataDownTrackArgsForCall = append(fake.addDataDownTrackArgsForCall, struct {
		arg1 types.DataTrackSender
	}{arg1})
	stub := fake.AddDataDownTrackStub
	fakeReturns := fake.addDataDownTrackReturns
	fake.recordInvocation("AddDataDownTrack", []interface{}{arg1})
	fake.addDataDownTrackMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataTrack) AddDataDownTrackCallCount() int {
	fake.addDataDownTrackMutex.RLock()
	defer fake.addDataDownTrackMutex.RUnlock()
	return len(fake.addDataDownTrackArgsForCall)
}

func (fake *FakeDataTrack) AddDataDownTrackCalls(stub func(types.DataTrackSender) error) {
	fake.addDataDownTrackMutex.Lock()
	defer fake.addDataDownTrackMutex.Unlock()
	fake.AddDataDownTrackStub = stub
}

func (fake *FakeDataTrack) AddDataDownTrackArgsForCall(i int) types.DataTrackSender {
	fake.addDataDownTrackMutex.RLock()
	defer fake.addDataDownTrackMutex.RUnlock()
	argsForCall := fake.addDataDownTrackArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDataTrack) AddDataDownTrackReturns(result1 error) {
	fake.addDataDownTrackMutex.Lock()
	defer fake.addDataDownTrackMutex.Unlock()
	fake.AddDataDownTrackStub = nil
	fake.addDataDownTrackReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeDataTrack) AddDataDownTrackReturnsOnCall(i int, result1 error) {
	fake.addDataDownTrackMutex.Lock()
	defer fake.addDataDownTrackMutex.Unlock()
	fake.AddDataDownTrackStub = nil
	if fake.addDataDownTrackReturnsOnCall == nil {
		fake.addDataDownTrackReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.addDataDownTrackReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeDataTrack) AddSubscriber(arg1 types.LocalParticipant) (types.DataDownTrack, error) {
	fake.addSubscriberMutex.Lock()
	ret, specificReturn := fake.addSubscriberReturnsOnCall[len(fake.addSubscriberArgsForCall)]
	fake.addSubscriberArgsForCall = append(fake.addSubscriberArgsForCall, struct {
		arg1 types.LocalParticipant
	}{arg1})
	stub := fake.AddSubscriberStub
	fakeReturns := fake.addSubscriberReturns
	fake.recordInvocation("AddSubscriber", []interface{}{arg1})
	fake.addSubscriberMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeDataTrack) AddSubscriberCallCount() int {
	fake.addSubscriberMutex.RLock()
	defer fake.addSubscriberMutex.RUnlock()
	return len(fake.addSubscriberArgsForCall)
}

func (fake *FakeDataTrack) AddSubscriberCalls(stub func(types.LocalParticipant) (types.DataDownTrack, error)) {
	fake.addSubscriberMutex.Lock()
	defer fake.addSubscriberMutex.Unlock()
	fake.AddSubscriberStub = stub
}

func (fake *FakeDataTrack) AddSubscriberArgsForCall(i int) types.LocalParticipant {
	fake.addSubscriberMutex.RLock()
	defer fake.addSubscriberMutex.RUnlock()
	argsForCall := fake.addSubscriberArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDataTrack) AddSubscriberReturns(result1 types.DataDownTrack, result2 error) {
	fake.addSubscriberMutex.Lock()
	defer fake.addSubscriberMutex.Unlock()
	fake.AddSubscriberStub = nil
	fake.addSubscriberReturns = struct {
		result1 types.DataDownTrack
		result2 error
	}{result1, result2}
}

func (fake *FakeDataTrack) AddSubscriberReturnsOnCall(i int, result1 types.DataDownTrack, result2 error) {
	fake.addSubscriberMutex.Lock()
	defer fake.addSubscriberMutex.Unlock()
	fake.AddSubscriberStub = nil
	if fake.addSubscriberReturnsOnCall == nil {
		fake.addSubscriberReturnsOnCall = make(map[int]struct {
			result1 types.DataDownTrack
			result2 error
		})
	}
	fake.addSubscriberReturnsOnCall[i] = struct {
		result1 types.DataDownTrack
		result2 error
	}{result1, result2}
}

func (fake *FakeDataTrack) 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 *FakeDataTrack) CloseCallCount() int {
	fake.closeMutex.RLock()
	defer fake.closeMutex.RUnlock()
	return len(fake.closeArgsForCall)
}

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

func (fake *FakeDataTrack) DeleteDataDownTrack(arg1 livekit.ParticipantID) {
	fake.deleteDataDownTrackMutex.Lock()
	fake.deleteDataDownTrackArgsForCall = append(fake.deleteDataDownTrackArgsForCall, struct {
		arg1 livekit.ParticipantID
	}{arg1})
	stub := fake.DeleteDataDownTrackStub
	fake.recordInvocation("DeleteDataDownTrack", []interface{}{arg1})
	fake.deleteDataDownTrackMutex.Unlock()
	if stub != nil {
		fake.DeleteDataDownTrackStub(arg1)
	}
}

func (fake *FakeDataTrack) DeleteDataDownTrackCallCount() int {
	fake.deleteDataDownTrackMutex.RLock()
	defer fake.deleteDataDownTrackMutex.RUnlock()
	return len(fake.deleteDataDownTrackArgsForCall)
}

func (fake *FakeDataTrack) DeleteDataDownTrackCalls(stub func(livekit.ParticipantID)) {
	fake.deleteDataDownTrackMutex.Lock()
	defer fake.deleteDataDownTrackMutex.Unlock()
	fake.DeleteDataDownTrackStub = stub
}

func (fake *FakeDataTrack) DeleteDataDownTrackArgsForCall(i int) livekit.ParticipantID {
	fake.deleteDataDownTrackMutex.RLock()
	defer fake.deleteDataDownTrackMutex.RUnlock()
	argsForCall := fake.deleteDataDownTrackArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDataTrack) HandlePacket(arg1 []byte, arg2 *datatrack.Packet) {
	var arg1Copy []byte
	if arg1 != nil {
		arg1Copy = make([]byte, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.handlePacketMutex.Lock()
	fake.handlePacketArgsForCall = append(fake.handlePacketArgsForCall, struct {
		arg1 []byte
		arg2 *datatrack.Packet
	}{arg1Copy, arg2})
	stub := fake.HandlePacketStub
	fake.recordInvocation("HandlePacket", []interface{}{arg1Copy, arg2})
	fake.handlePacketMutex.Unlock()
	if stub != nil {
		fake.HandlePacketStub(arg1, arg2)
	}
}

func (fake *FakeDataTrack) HandlePacketCallCount() int {
	fake.handlePacketMutex.RLock()
	defer fake.handlePacketMutex.RUnlock()
	return len(fake.handlePacketArgsForCall)
}

func (fake *FakeDataTrack) HandlePacketCalls(stub func([]byte, *datatrack.Packet)) {
	fake.handlePacketMutex.Lock()
	defer fake.handlePacketMutex.Unlock()
	fake.HandlePacketStub = stub
}

func (fake *FakeDataTrack) HandlePacketArgsForCall(i int) ([]byte, *datatrack.Packet) {
	fake.handlePacketMutex.RLock()
	defer fake.handlePacketMutex.RUnlock()
	argsForCall := fake.handlePacketArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeDataTrack) ID() livekit.TrackID {
	fake.iDMutex.Lock()
	ret, specificReturn := fake.iDReturnsOnCall[len(fake.iDArgsForCall)]
	fake.iDArgsForCall = append(fake.iDArgsForCall, struct {
	}{})
	stub := fake.IDStub
	fakeReturns := fake.iDReturns
	fake.recordInvocation("ID", []interface{}{})
	fake.iDMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataTrack) IDCallCount() int {
	fake.iDMutex.RLock()
	defer fake.iDMutex.RUnlock()
	return len(fake.iDArgsForCall)
}

func (fake *FakeDataTrack) IDCalls(stub func() livekit.TrackID) {
	fake.iDMutex.Lock()
	defer fake.iDMutex.Unlock()
	fake.IDStub = stub
}

func (fake *FakeDataTrack) IDReturns(result1 livekit.TrackID) {
	fake.iDMutex.Lock()
	defer fake.iDMutex.Unlock()
	fake.IDStub = nil
	fake.iDReturns = struct {
		result1 livekit.TrackID
	}{result1}
}

func (fake *FakeDataTrack) IDReturnsOnCall(i int, result1 livekit.TrackID) {
	fake.iDMutex.Lock()
	defer fake.iDMutex.Unlock()
	fake.IDStub = nil
	if fake.iDReturnsOnCall == nil {
		fake.iDReturnsOnCall = make(map[int]struct {
			result1 livekit.TrackID
		})
	}
	fake.iDReturnsOnCall[i] = struct {
		result1 livekit.TrackID
	}{result1}
}

func (fake *FakeDataTrack) IsSubscriber(arg1 livekit.ParticipantID) bool {
	fake.isSubscriberMutex.Lock()
	ret, specificReturn := fake.isSubscriberReturnsOnCall[len(fake.isSubscriberArgsForCall)]
	fake.isSubscriberArgsForCall = append(fake.isSubscriberArgsForCall, struct {
		arg1 livekit.ParticipantID
	}{arg1})
	stub := fake.IsSubscriberStub
	fakeReturns := fake.isSubscriberReturns
	fake.recordInvocation("IsSubscriber", []interface{}{arg1})
	fake.isSubscriberMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataTrack) IsSubscriberCallCount() int {
	fake.isSubscriberMutex.RLock()
	defer fake.isSubscriberMutex.RUnlock()
	return len(fake.isSubscriberArgsForCall)
}

func (fake *FakeDataTrack) IsSubscriberCalls(stub func(livekit.ParticipantID) bool) {
	fake.isSubscriberMutex.Lock()
	defer fake.isSubscriberMutex.Unlock()
	fake.IsSubscriberStub = stub
}

func (fake *FakeDataTrack) IsSubscriberArgsForCall(i int) livekit.ParticipantID {
	fake.isSubscriberMutex.RLock()
	defer fake.isSubscriberMutex.RUnlock()
	argsForCall := fake.isSubscriberArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDataTrack) IsSubscriberReturns(result1 bool) {
	fake.isSubscriberMutex.Lock()
	defer fake.isSubscriberMutex.Unlock()
	fake.IsSubscriberStub = nil
	fake.isSubscriberReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakeDataTrack) IsSubscriberReturnsOnCall(i int, result1 bool) {
	fake.isSubscriberMutex.Lock()
	defer fake.isSubscriberMutex.Unlock()
	fake.IsSubscriberStub = nil
	if fake.isSubscriberReturnsOnCall == nil {
		fake.isSubscriberReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.isSubscriberReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakeDataTrack) Name() string {
	fake.nameMutex.Lock()
	ret, specificReturn := fake.nameReturnsOnCall[len(fake.nameArgsForCall)]
	fake.nameArgsForCall = append(fake.nameArgsForCall, struct {
	}{})
	stub := fake.NameStub
	fakeReturns := fake.nameReturns
	fake.recordInvocation("Name", []interface{}{})
	fake.nameMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataTrack) NameCallCount() int {
	fake.nameMutex.RLock()
	defer fake.nameMutex.RUnlock()
	return len(fake.nameArgsForCall)
}

func (fake *FakeDataTrack) NameCalls(stub func() string) {
	fake.nameMutex.Lock()
	defer fake.nameMutex.Unlock()
	fake.NameStub = stub
}

func (fake *FakeDataTrack) NameReturns(result1 string) {
	fake.nameMutex.Lock()
	defer fake.nameMutex.Unlock()
	fake.NameStub = nil
	fake.nameReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeDataTrack) NameReturnsOnCall(i int, result1 string) {
	fake.nameMutex.Lock()
	defer fake.nameMutex.Unlock()
	fake.NameStub = nil
	if fake.nameReturnsOnCall == nil {
		fake.nameReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.nameReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

func (fake *FakeDataTrack) PubHandle() uint16 {
	fake.pubHandleMutex.Lock()
	ret, specificReturn := fake.pubHandleReturnsOnCall[len(fake.pubHandleArgsForCall)]
	fake.pubHandleArgsForCall = append(fake.pubHandleArgsForCall, struct {
	}{})
	stub := fake.PubHandleStub
	fakeReturns := fake.pubHandleReturns
	fake.recordInvocation("PubHandle", []interface{}{})
	fake.pubHandleMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataTrack) PubHandleCallCount() int {
	fake.pubHandleMutex.RLock()
	defer fake.pubHandleMutex.RUnlock()
	return len(fake.pubHandleArgsForCall)
}

func (fake *FakeDataTrack) PubHandleCalls(stub func() uint16) {
	fake.pubHandleMutex.Lock()
	defer fake.pubHandleMutex.Unlock()
	fake.PubHandleStub = stub
}

func (fake *FakeDataTrack) PubHandleReturns(result1 uint16) {
	fake.pubHandleMutex.Lock()
	defer fake.pubHandleMutex.Unlock()
	fake.PubHandleStub = nil
	fake.pubHandleReturns = struct {
		result1 uint16
	}{result1}
}

func (fake *FakeDataTrack) PubHandleReturnsOnCall(i int, result1 uint16) {
	fake.pubHandleMutex.Lock()
	defer fake.pubHandleMutex.Unlock()
	fake.PubHandleStub = nil
	if fake.pubHandleReturnsOnCall == nil {
		fake.pubHandleReturnsOnCall = make(map[int]struct {
			result1 uint16
		})
	}
	fake.pubHandleReturnsOnCall[i] = struct {
		result1 uint16
	}{result1}
}

func (fake *FakeDataTrack) RemoveSubscriber(arg1 livekit.ParticipantID) {
	fake.removeSubscriberMutex.Lock()
	fake.removeSubscriberArgsForCall = append(fake.removeSubscriberArgsForCall, struct {
		arg1 livekit.ParticipantID
	}{arg1})
	stub := fake.RemoveSubscriberStub
	fake.recordInvocation("RemoveSubscriber", []interface{}{arg1})
	fake.removeSubscriberMutex.Unlock()
	if stub != nil {
		fake.RemoveSubscriberStub(arg1)
	}
}

func (fake *FakeDataTrack) RemoveSubscriberCallCount() int {
	fake.removeSubscriberMutex.RLock()
	defer fake.removeSubscriberMutex.RUnlock()
	return len(fake.removeSubscriberArgsForCall)
}

func (fake *FakeDataTrack) RemoveSubscriberCalls(stub func(livekit.ParticipantID)) {
	fake.removeSubscriberMutex.Lock()
	defer fake.removeSubscriberMutex.Unlock()
	fake.RemoveSubscriberStub = stub
}

func (fake *FakeDataTrack) RemoveSubscriberArgsForCall(i int) livekit.ParticipantID {
	fake.removeSubscriberMutex.RLock()
	defer fake.removeSubscriberMutex.RUnlock()
	argsForCall := fake.removeSubscriberArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDataTrack) ToProto() *livekit.DataTrackInfo {
	fake.toProtoMutex.Lock()
	ret, specificReturn := fake.toProtoReturnsOnCall[len(fake.toProtoArgsForCall)]
	fake.toProtoArgsForCall = append(fake.toProtoArgsForCall, struct {
	}{})
	stub := fake.ToProtoStub
	fakeReturns := fake.toProtoReturns
	fake.recordInvocation("ToProto", []interface{}{})
	fake.toProtoMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataTrack) ToProtoCallCount() int {
	fake.toProtoMutex.RLock()
	defer fake.toProtoMutex.RUnlock()
	return len(fake.toProtoArgsForCall)
}

func (fake *FakeDataTrack) ToProtoCalls(stub func() *livekit.DataTrackInfo) {
	fake.toProtoMutex.Lock()
	defer fake.toProtoMutex.Unlock()
	fake.ToProtoStub = stub
}

func (fake *FakeDataTrack) ToProtoReturns(result1 *livekit.DataTrackInfo) {
	fake.toProtoMutex.Lock()
	defer fake.toProtoMutex.Unlock()
	fake.ToProtoStub = nil
	fake.toProtoReturns = struct {
		result1 *livekit.DataTrackInfo
	}{result1}
}

func (fake *FakeDataTrack) ToProtoReturnsOnCall(i int, result1 *livekit.DataTrackInfo) {
	fake.toProtoMutex.Lock()
	defer fake.toProtoMutex.Unlock()
	fake.ToProtoStub = nil
	if fake.toProtoReturnsOnCall == nil {
		fake.toProtoReturnsOnCall = make(map[int]struct {
			result1 *livekit.DataTrackInfo
		})
	}
	fake.toProtoReturnsOnCall[i] = struct {
		result1 *livekit.DataTrackInfo
	}{result1}
}

func (fake *FakeDataTrack) 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 *FakeDataTrack) 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.DataTrack = new(FakeDataTrack)
