blob: d6a2e7b705c0df8e219af47af9c5a1c2b298505c [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <windows.h>
#include <winsock2.h>
namespace chrome_cleaner {
// This class is used as a wrapper around the OS calls to interact with layered
// service providers (aka LSPs). This allows test to more easily provide mock
// for these OS calls.
class LayeredServiceProviderAPI {
virtual ~LayeredServiceProviderAPI() {}
// Like WSCEnumProtocols.
virtual int EnumProtocols(int* protocols,
WSAPROTOCOL_INFOW* protocol_info,
DWORD* nb_protocol_info,
int* error) const = 0;
// Like WSCGetProviderPath.
virtual int GetProviderPath(GUID* provider_id,
wchar_t* provider_dll_path,
int* provider_dll_path_len,
int* error) const = 0;
} // namespace chrome_cleaner