summaryrefslogtreecommitdiff
path: root/src/session.cpp
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2008-08-06 14:39:07 +0200
committerDennis Kasprzyk <onestone@opencompositing.org>2008-08-06 14:39:07 +0200
commit9c76f36894f1f825aa01f519e2b364b979c32a26 (patch)
treeeec49bb1794ee6570acb47a30a9ddc695198e57e /src/session.cpp
parent0e942665257980878d6271cbcad4647d04204093 (diff)
downloadmobilebling-9c76f36894f1f825aa01f519e2b364b979c32a26.tar.gz
mobilebling-9c76f36894f1f825aa01f519e2b364b979c32a26.tar.bz2
Conversion ob main classes to C++.
Diffstat (limited to 'src/session.cpp')
-rw-r--r--src/session.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/session.cpp b/src/session.cpp
index 28f60cd..3ab90da 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -180,7 +180,7 @@ saveYourselfCallback (SmcConn connection,
args[3].name = "fast";
args[3].value.b = fast;
- (*core.sessionEvent) (&core, CompSessionEventSaveYourself, args, 4);
+ core->sessionEvent (CompSessionEventSaveYourself, args, 4);
setCloneRestartCommands (connection);
setRestartStyle (connection, SmRestartImmediately);
@@ -192,7 +192,7 @@ static void
dieCallback (SmcConn connection,
SmPointer clientData)
{
- (*core.sessionEvent) (&core, CompSessionEventDie, NULL, 0);
+ core->sessionEvent (CompSessionEventDie, NULL, 0);
closeSession ();
exit (0);
@@ -202,14 +202,14 @@ static void
saveCompleteCallback (SmcConn connection,
SmPointer clientData)
{
- (*core.sessionEvent) (&core, CompSessionEventSaveComplete, NULL, 0);
+ core->sessionEvent (CompSessionEventSaveComplete, NULL, 0);
}
static void
shutdownCancelledCallback (SmcConn connection,
SmPointer clientData)
{
- (*core.sessionEvent) (&core, CompSessionEventShutdownCancelled, NULL, 0);
+ core->sessionEvent (CompSessionEventShutdownCancelled, NULL, 0);
}
void
@@ -283,14 +283,6 @@ closeSession (void)
}
}
-void
-sessionEvent (CompCore *c,
- CompSessionEvent event,
- CompOption *arguments,
- unsigned int nArguments)
-{
-}
-
char *
getSessionClientId (CompSessionClientIdType type)
{
@@ -316,7 +308,7 @@ getSessionClientId (CompSessionClientIdType type)
*/
/* This is called when data is available on an ICE connection. */
-static Bool
+static bool
iceProcessMessages (void *data)
{
IceConn connection = (IceConn) data;
@@ -356,7 +348,7 @@ iceNewConnection (IceConn connection,
fcntl (IceConnectionNumber (connection),
F_GETFD,0) | FD_CLOEXEC);
- iceWatchFdHandle = compAddWatchFd (IceConnectionNumber (connection),
+ iceWatchFdHandle = core->addWatchFd (IceConnectionNumber (connection),
POLLIN | POLLPRI | POLLHUP | POLLERR,
iceProcessMessages, connection);
@@ -368,7 +360,7 @@ iceNewConnection (IceConn connection,
if (iceConnected)
{
- compRemoveWatchFd (iceWatchFdHandle);
+ core->removeWatchFd (iceWatchFdHandle);
iceWatchFdHandle = 0;
iceConnected = 0;