-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://xpra.org/svn/Xpra/trunk@15933 3bb7dfac-3a0b-4e04-842a-767bc560f471
- Loading branch information
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# This file is part of Xpra. | ||
# Copyright (C) 2017 Antoine Martin <[email protected]> | ||
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any | ||
# later version. See the file COPYING for details. | ||
|
||
import threading | ||
from xpra.log import Logger | ||
from xpra.platform import init, clean | ||
|
||
class Handler(object): | ||
|
||
def __init__(self): | ||
init("Xpra Service", "Xpra Service") | ||
self.log = Logger("server", "win32") | ||
self.log.info("Service.init()") | ||
self.stopEvent = threading.Event() | ||
self.stopRequestedEvent = threading.Event() | ||
|
||
def Initialize(self, configFileName): | ||
self.log.info("Service.Initialize(%s)", configFileName) | ||
|
||
def SessionChanged(self, sessionId, eventType): | ||
self.log.info("Service.SessionChanged(%s, %s)", sessionId, eventType) | ||
|
||
def Run(self): | ||
self.log.info("Service.Run()") | ||
self.stopRequestedEvent.wait() | ||
self.stopEvent.set() | ||
clean() | ||
|
||
def Stop(self): | ||
self.log.info("Service.Stop()") | ||
self.stopRequestedEvent.set() | ||
self.stopEvent.wait() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# -*- coding: utf-8 -*- | ||
# This file is part of Xpra. | ||
# Copyright (C) 2017 Antoine Martin <[email protected]> | ||
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any | ||
# later version. See the file COPYING for details. | ||
|
||
NAME = 'Xpra%s' | ||
DISPLAY_NAME = 'Xpra Service - %s' | ||
MODULE_NAME = 'xpra.platform.win32.service' | ||
CLASS_NAME = 'Service' | ||
DESCRIPTION = 'Xpra System Proxy Service' | ||
AUTO_START = True | ||
SESSION_CHANGES = True |