summaryrefslogtreecommitdiffstats
path: root/src/input/pvsPrivInputSocket.h
diff options
context:
space:
mode:
authorSebastien Braun2010-10-23 17:49:12 +0200
committerSebastien Braun2010-10-24 23:43:08 +0200
commit7e3b963e3a0cbbf9391243e72ceb015e9015d630 (patch)
treed980c26b837ef106e286ea3ed3562ee37ffbd0bf /src/input/pvsPrivInputSocket.h
parentFix forgotten change of j to mods in X11FakeKeyboardHandler. (diff)
downloadpvs-7e3b963e3a0cbbf9391243e72ceb015e9015d630.tar.gz
pvs-7e3b963e3a0cbbf9391243e72ceb015e9015d630.tar.xz
pvs-7e3b963e3a0cbbf9391243e72ceb015e9015d630.zip
Documentation fixes and code cleanup
Diffstat (limited to 'src/input/pvsPrivInputSocket.h')
-rw-r--r--src/input/pvsPrivInputSocket.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/input/pvsPrivInputSocket.h b/src/input/pvsPrivInputSocket.h
index 447360b..a57d730 100644
--- a/src/input/pvsPrivInputSocket.h
+++ b/src/input/pvsPrivInputSocket.h
@@ -24,14 +24,52 @@
class QSettings;
+/**
+ * Load \c pvsprivinputd's configuration. This keeps a cached copy.
+ */
QSettings* pvsPrivInputGetSettings();
+
+/**
+ * Update the cached configuration copy kept by pvsPrivInputGetSettings().
+ */
QSettings* pvsPrivInputReopenSettings();
+
+/**
+ * Hardcoded to \c /etc/pvsprivinputd.conf
+ */
QString pvsPrivInputGetSettingsPath();
+
+/**
+ * Retrieve the path at which \c pvsprivinputd listens for datagrams from
+ * its configuration.
+ */
QString pvsPrivInputGetSocketAddress();
+
+/**
+ * Enable the receiving of sender credentials on a \c unix(7) socket.
+ */
bool pvsPrivInputEnableReceiveCredentials(int sock);
+
+/**
+ * Make a \c unix(7) socket that is suitable for sending authenticated
+ * datagrams to \c pvsprivinputd.
+ */
int pvsPrivInputMakeClientSocket();
+
+/**
+ * Make a listening \c unix(7) socket at the address specified by
+ * pvsPrivInputGetSocketAddress() that receives sender credentials.
+ */
int pvsPrivInputMakeServerSocket();
+
+/**
+ * Send an authenticated message on a \c unix(7) socket.
+ */
bool pvsPrivInputSendMessage(int sock, void* buf, size_t len, int* err = 0);
+
+/**
+ * Receive an authenticated message on a \c unix(7) socket.
+ */
bool pvsPrivInputRecvMessage(int sock, void* buf, size_t& len, pid_t& pid, uid_t& uid, gid_t& gid, int* err = 0);
#endif /* PVSPRIVINPUTSOCKET_H_ */