protocols: refactor class member vars (n-t) (#10273)

This commit is contained in:
davc0n 2025-05-04 19:21:36 +02:00 committed by GitHub
parent adbae0f74d
commit 2626f89ea6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 1507 additions and 1511 deletions

View file

@ -13,18 +13,23 @@ class CSecurityContext {
bool good();
std::string sandboxEngine, appID, instanceID;
Hyprutils::OS::CFileDescriptor listenFD, closeFD;
std::string m_sandboxEngine;
std::string m_appID;
std::string m_instanceID;
Hyprutils::OS::CFileDescriptor m_listenFD;
Hyprutils::OS::CFileDescriptor m_closeFD;
void onListen(uint32_t mask);
void onClose(uint32_t mask);
private:
SP<CWpSecurityContextV1> resource;
SP<CWpSecurityContextV1> m_resource;
wl_event_source * listenSource = nullptr, *closeSource = nullptr;
wl_event_source* m_listenSource = nullptr;
wl_event_source* m_closeSource = nullptr;
bool committed = false;
bool m_committed = false;
};
class CSecurityContextManagerResource {
@ -34,7 +39,7 @@ class CSecurityContextManagerResource {
bool good();
private:
SP<CWpSecurityContextManagerV1> resource;
SP<CWpSecurityContextManagerV1> m_resource;
};
class CSecurityContextSandboxedClient;
@ -50,13 +55,13 @@ class CSecurityContextSandboxedClient {
void onDestroy();
SCSecurityContextSandboxedClientDestroyWrapper destroyListener;
SCSecurityContextSandboxedClientDestroyWrapper m_destroyListener;
private:
CSecurityContextSandboxedClient(Hyprutils::OS::CFileDescriptor clientFD_);
wl_client* client = nullptr;
Hyprutils::OS::CFileDescriptor clientFD;
wl_client* m_client = nullptr;
Hyprutils::OS::CFileDescriptor m_clientFD;
friend class CSecurityContextProtocol;
friend class CSecurityContext;
@ -76,9 +81,9 @@ class CSecurityContextProtocol : public IWaylandProtocol {
void destroyContext(CSecurityContext* context);
//
std::vector<SP<CSecurityContextManagerResource>> m_vManagers;
std::vector<SP<CSecurityContext>> m_vContexts;
std::vector<SP<CSecurityContextSandboxedClient>> m_vSandboxedClients;
std::vector<SP<CSecurityContextManagerResource>> m_managers;
std::vector<SP<CSecurityContext>> m_contexts;
std::vector<SP<CSecurityContextSandboxedClient>> m_sandboxedClients;
friend class CSecurityContextManagerResource;
friend class CSecurityContext;