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
41021b91
Commit
41021b91
authored
Oct 06, 2010
by
Devaev Maxim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hieratic structure of shareds
parent
0b72ba22
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
53 deletions
+60
-53
fmod_example.py
functions/fmod_example.py
+59
-0
fmod_settingsd.py
functions/fmod_settingsd.py
+1
-1
hello.py
functions/hello.py
+0
-52
No files found.
functions/fmod_example.py
0 → 100644
View file @
41021b91
# -*- coding: utf-8 -*-
import
time
from
settingsd
import
config
from
settingsd
import
service
from
settingsd
import
shared
##### Private classes #####
class
Example
(
service
.
FunctionObject
)
:
### DBus methods ###
@service.functionMethod
(
"example"
)
def
hello
(
self
)
:
return
config
.
value
(
self
.
service
()
.
serviceName
(),
"hello_string"
)
@service.functionMethod
(
"example"
)
def
echo
(
self
,
text
)
:
return
text
def
time
(
self
)
:
return
time
.
ctime
()
@service.customMethod
(
"com.example.settingsd"
)
def
die
(
self
)
:
shared
.
Functions
.
Test
.
Example
.
removeFromConnection
()
shared
.
Functions
.
Test
.
removeSharedObject
(
"Example"
)
return
self
.
sharedPath
()
###
@service.functionMethod
(
"dbus"
)
def
dbusEcho
(
self
,
text
)
:
self
.
dbusEchoSignal
(
text
)
@service.functionSignal
(
"dbus"
)
def
dbusEchoSignal
(
self
,
text
)
:
pass
##### Public classes #####
class
Service
(
service
.
Service
)
:
def
initService
(
self
)
:
shared
.
Functions
.
addShared
(
"Test"
)
shared
.
Functions
.
Test
.
addSharedObject
(
"Example"
,
Example
(
self
.
serviceName
(),
"Test.Example"
,
self
))
@classmethod
def
serviceName
(
self
)
:
return
"example"
@classmethod
def
optionsList
(
self
)
:
return
[
(
self
.
serviceName
(),
"hello_string"
,
"Hello, World!"
,
str
)
]
functions/fmod_settingsd.py
View file @
41021b91
...
...
@@ -30,7 +30,7 @@ class Service(service.Service) :
### Public ###
def
initService
(
self
)
:
shared
.
Functions
.
addSharedObject
(
"Settingsd"
,
Settingsd
(
const
.
DEFAULT_SERVICE_PATH
))
shared
.
Functions
.
addSharedObject
(
"Settingsd"
,
Settingsd
(
const
.
DEFAULT_SERVICE_PATH
,
"Settingsd"
,
self
))
@classmethod
def
serviceName
(
self
)
:
...
...
functions/hello.py
deleted
100644 → 0
View file @
0b72ba22
# -*- coding: utf-8 -*-
import
sys
import
settingsd.service
import
settingsd.shared
class
Hello
(
settingsd
.
service
.
FunctionObject
)
:
@settingsd.service.functionMethod
(
"test"
)
def
hello
(
self
)
:
return
"Hello, World!"
@settingsd.service.functionMethod
(
"test"
)
def
echo
(
self
,
text
)
:
return
text
@settingsd.service.customMethod
(
"org.liksys.settingsd"
)
def
dump
(
self
)
:
return
str
(
self
)
@settingsd.service.customMethod
(
"org.liksys.settingsd"
)
def
die
(
self
)
:
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
()))
@classmethod
def
serviceName
(
self
)
:
return
"hello"
@classmethod
def
optionsList
(
self
)
:
return
[
(
self
.
serviceName
(),
"hello_string"
,
"Hello, World!"
,
str
)
]
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