Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
settingsd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
settingsd
Commits
1bde63d9
Commit
1bde63d9
authored
Sep 23, 2010
by
Devaev Maxim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support of D-Bus signals
parent
ffc35d5b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
hello.py
functions/hello.py
+11
-0
service.py
settingsd/service.py
+23
-4
No files found.
functions/hello.py
View file @
1bde63d9
...
...
@@ -22,6 +22,17 @@ class Hello(settingsd.service.FunctionObject) :
settingsd
.
shared
.
Functions
.
Hello
.
removeFromConnection
()
settingsd
.
shared
.
Functions
.
removeSharedObject
(
"Hello"
)
###
@settingsd.service.functionMethod
(
"dbus"
)
def
dbusEcho
(
self
,
text
)
:
self
.
dbusEchoSignal
(
text
)
@settingsd.service.functionSignal
(
"dbus"
)
def
dbusEchoSignal
(
self
,
text
)
:
pass
class
Service
(
settingsd
.
service
.
Service
)
:
def
initService
(
self
)
:
self
.
Functions
.
addSharedObject
(
"Hello"
,
Hello
(
self
.
serviceName
()))
...
...
settingsd/service.py
View file @
1bde63d9
...
...
@@ -104,13 +104,32 @@ def customMethod(interface_name) :
def
functionMethod
(
interface_name
)
:
def
decorator
(
function
)
:
return
customMethod
(
dbus_tools
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"
service_name"
),
"
functions"
,
interface_name
))(
function
)
return
customMethod
(
dbus_tools
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
"functions"
,
interface_name
))(
function
)
return
decorator
def
actionsMethod
(
interface_name
)
:
def
decorator
(
function
)
:
return
customMethod
(
dbus_tools
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
"actions"
,
interface_name
))(
function
)
return
customMethod
(
dbus_tools
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
"actions"
,
interface_name
))(
function
)
return
decorator
###
def
customSignal
(
interface_name
)
:
def
decorator
(
function
)
:
return
dbus
.
service
.
signal
(
interface_name
)(
function
)
return
decorator
def
functionSignal
(
interface_name
)
:
def
decorator
(
function
)
:
return
customSignal
(
dbus_tools
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
"functions"
,
interface_name
))(
function
)
return
decorator
def
actionsSignal
(
interface_name
)
:
def
decorator
(
function
)
:
return
customSignal
(
dbus_tools
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
"actions"
,
interface_name
))(
function
)
return
decorator
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment