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

import (
	"sync"

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

type FakeDataTrackTransport struct {
	SendDataTrackMessageStub        func([]byte) error
	sendDataTrackMessageMutex       sync.RWMutex
	sendDataTrackMessageArgsForCall []struct {
		arg1 []byte
	}
	sendDataTrackMessageReturns struct {
		result1 error
	}
	sendDataTrackMessageReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDataTrackTransport) SendDataTrackMessage(arg1 []byte) error {
	var arg1Copy []byte
	if arg1 != nil {
		arg1Copy = make([]byte, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.sendDataTrackMessageMutex.Lock()
	ret, specificReturn := fake.sendDataTrackMessageReturnsOnCall[len(fake.sendDataTrackMessageArgsForCall)]
	fake.sendDataTrackMessageArgsForCall = append(fake.sendDataTrackMessageArgsForCall, struct {
		arg1 []byte
	}{arg1Copy})
	stub := fake.SendDataTrackMessageStub
	fakeReturns := fake.sendDataTrackMessageReturns
	fake.recordInvocation("SendDataTrackMessage", []interface{}{arg1Copy})
	fake.sendDataTrackMessageMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataTrackTransport) SendDataTrackMessageCallCount() int {
	fake.sendDataTrackMessageMutex.RLock()
	defer fake.sendDataTrackMessageMutex.RUnlock()
	return len(fake.sendDataTrackMessageArgsForCall)
}

func (fake *FakeDataTrackTransport) SendDataTrackMessageCalls(stub func([]byte) error) {
	fake.sendDataTrackMessageMutex.Lock()
	defer fake.sendDataTrackMessageMutex.Unlock()
	fake.SendDataTrackMessageStub = stub
}

func (fake *FakeDataTrackTransport) SendDataTrackMessageArgsForCall(i int) []byte {
	fake.sendDataTrackMessageMutex.RLock()
	defer fake.sendDataTrackMessageMutex.RUnlock()
	argsForCall := fake.sendDataTrackMessageArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDataTrackTransport) SendDataTrackMessageReturns(result1 error) {
	fake.sendDataTrackMessageMutex.Lock()
	defer fake.sendDataTrackMessageMutex.Unlock()
	fake.SendDataTrackMessageStub = nil
	fake.sendDataTrackMessageReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeDataTrackTransport) SendDataTrackMessageReturnsOnCall(i int, result1 error) {
	fake.sendDataTrackMessageMutex.Lock()
	defer fake.sendDataTrackMessageMutex.Unlock()
	fake.SendDataTrackMessageStub = nil
	if fake.sendDataTrackMessageReturnsOnCall == nil {
		fake.sendDataTrackMessageReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.sendDataTrackMessageReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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