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
c0de2cc1
Commit
c0de2cc1
authored
Oct 08, 2010
by
Devaev Maxim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Completed example module
parent
11f3ec4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
fmod_example.py
functions/fmod_example.py
+12
-5
No files found.
functions/fmod_example.py
View file @
c0de2cc1
...
...
@@ -6,6 +6,7 @@ import time
from
settingsd
import
config
from
settingsd
import
service
from
settingsd
import
shared
from
settingsd
import
dbus_tools
##### Private classes #####
...
...
@@ -21,14 +22,20 @@ class Example(service.FunctionObject) :
def
echo
(
self
,
text
)
:
return
text
@service.functionMethod
(
"example"
)
def
time
(
self
)
:
return
time
.
ctime
()
@service.customMethod
(
"com.example.settingsd"
)
###
@service.customMethod
(
"com.example.settingsd.sharedObject"
)
def
die
(
self
)
:
shared
.
Functions
.
Test
.
Example
.
removeFromConnection
()
shared
.
Functions
.
Test
.
removeSharedObject
(
"Example"
)
return
self
.
sharedPath
()
self
.
removeFromConnection
()
# shared.Functions.Test.Example.removeFromConnection()
self
.
shared
()
.
removeSharedObject
(
self
.
name
())
# shared.Functions.Test.removeSharedObject("Example")
@service.customMethod
(
"com.example.settingsd.sharedObject"
)
def
path
(
self
)
:
return
service
.
FunctionObject
.
path
(
self
)
###
...
...
@@ -45,7 +52,7 @@ class Example(service.FunctionObject) :
class
Service
(
service
.
Service
)
:
def
initService
(
self
)
:
shared
.
Functions
.
addShared
(
"Test"
)
shared
.
Functions
.
Test
.
addSharedObject
(
"Example"
,
Example
(
self
.
serviceName
(),
"Test.Example"
,
self
))
shared
.
Functions
.
Test
.
addSharedObject
(
"Example"
,
Example
(
self
.
serviceName
(),
self
))
@classmethod
def
serviceName
(
self
)
:
...
...
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