Removed unused code.

This commit is contained in:
Gonzalo Exequiel Pedone 2020-09-10 18:33:01 -03:00
parent db094901bc
commit 1ce2384623
No known key found for this signature in database
GPG key ID: B8B09E63E9B85BAF
2 changed files with 0 additions and 93 deletions

View file

@ -99,34 +99,11 @@ namespace AkVCam
/* Server & Client */ /* Server & Client */
// Get the last error message.
std::wstring errorMessage() const;
// Pass extra options to the bridge.
void setOption(const std::string &key, const std::string &value);
// Driver search paths.
std::vector<std::wstring> driverPaths() const;
// Set driver search paths.
void setDriverPaths(const std::vector<std::wstring> &driverPaths);
// Driver configuration.
std::vector<std::string> availableDrivers() const;
std::string driver() const;
bool setDriver(const std::string &driver);
std::wstring picture() const; std::wstring picture() const;
void setPicture(const std::wstring &picture); void setPicture(const std::wstring &picture);
int logLevel() const; int logLevel() const;
void setLogLevel(int logLevel); void setLogLevel(int logLevel);
// Configure method to be used for executing commands with elevated
// privileges.
std::vector<std::string> availableRootMethods() const;
std::string rootMethod() const;
bool setRootMethod(const std::string &rootMethod);
// Manage main service connection. // Manage main service connection.
void connectService(); void connectService();
void disconnectService(); void disconnectService();

View file

@ -56,13 +56,10 @@ namespace AkVCam
xpc_connection_t m_serverMessagePort; xpc_connection_t m_serverMessagePort;
std::map<int64_t, XpcMessage> m_messageHandlers; std::map<int64_t, XpcMessage> m_messageHandlers;
std::vector<std::string> m_broadcasting; std::vector<std::string> m_broadcasting;
std::map<std::string, std::string> m_options;
std::wstring m_error;
IpcBridgePrivate(IpcBridge *self=nullptr); IpcBridgePrivate(IpcBridge *self=nullptr);
~IpcBridgePrivate(); ~IpcBridgePrivate();
static inline std::vector<std::wstring> *driverPaths();
inline void add(IpcBridge *bridge); inline void add(IpcBridge *bridge);
void remove(IpcBridge *bridge); void remove(IpcBridge *bridge);
inline std::vector<IpcBridge *> &bridges(); inline std::vector<IpcBridge *> &bridges();
@ -119,51 +116,6 @@ AkVCam::IpcBridge::~IpcBridge()
delete this->d; delete this->d;
} }
std::wstring AkVCam::IpcBridge::errorMessage() const
{
return this->d->m_error;
}
void AkVCam::IpcBridge::setOption(const std::string &key,
const std::string &value)
{
AkLogFunction();
if (value.empty())
this->d->m_options.erase(key);
else
this->d->m_options[key] = value;
}
std::vector<std::wstring> AkVCam::IpcBridge::driverPaths() const
{
AkLogFunction();
return *this->d->driverPaths();
}
void AkVCam::IpcBridge::setDriverPaths(const std::vector<std::wstring> &driverPaths)
{
AkLogFunction();
*this->d->driverPaths() = driverPaths;
}
std::vector<std::string> AkVCam::IpcBridge::availableDrivers() const
{
return {"AkVirtualCamera"};
}
std::string AkVCam::IpcBridge::driver() const
{
return {"AkVirtualCamera"};
}
bool AkVCam::IpcBridge::setDriver(const std::string &driver)
{
return driver == "AkVirtualCamera";
}
std::wstring AkVCam::IpcBridge::picture() const std::wstring AkVCam::IpcBridge::picture() const
{ {
return Preferences::picture(); return Preferences::picture();
@ -196,21 +148,6 @@ void AkVCam::IpcBridge::setLogLevel(int logLevel)
Logger::setLogLevel(logLevel); Logger::setLogLevel(logLevel);
} }
std::vector<std::string> AkVCam::IpcBridge::availableRootMethods() const
{
return {"osascript"};
}
std::string AkVCam::IpcBridge::rootMethod() const
{
return {"osascript"};
}
bool AkVCam::IpcBridge::setRootMethod(const std::string &rootMethod)
{
return rootMethod == "osascript";
}
void AkVCam::IpcBridge::connectService() void AkVCam::IpcBridge::connectService()
{ {
AkLogFunction(); AkLogFunction();
@ -859,13 +796,6 @@ AkVCam::IpcBridgePrivate::~IpcBridgePrivate()
} }
std::vector<std::wstring> *AkVCam::IpcBridgePrivate::driverPaths()
{
static std::vector<std::wstring> paths;
return &paths;
}
void AkVCam::IpcBridgePrivate::add(IpcBridge *bridge) void AkVCam::IpcBridgePrivate::add(IpcBridge *bridge)
{ {
this->m_bridges.push_back(bridge); this->m_bridges.push_back(bridge);