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
b88fe79e
Commit
b88fe79e
authored
Oct 13, 2010
by
Devaev Maxim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring
parent
703b60e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
fmod_example.py
functions/fmod_example.py
+10
-6
No files found.
functions/fmod_example.py
View file @
b88fe79e
...
...
@@ -8,6 +8,10 @@ from settingsd import service
from
settingsd
import
shared
##### Private constants #####
SERVICE_NAME
=
"example"
##### Private classes #####
class
Example
(
service
.
FunctionObject
)
:
...
...
@@ -29,8 +33,8 @@ class Example(service.FunctionObject) :
@service.customMethod
(
"com.example.settingsd.sharedObject"
)
def
die
(
self
)
:
self
.
removeFromConnection
()
# shared.Functions.
Test.E
xample.removeFromConnection()
self
.
shared
()
.
removeSharedObject
(
self
.
name
())
# shared.Functions.
Test.removeSharedObject("E
xample")
self
.
removeFromConnection
()
# shared.Functions.
test.e
xample.removeFromConnection()
self
.
shared
()
.
removeSharedObject
(
self
.
name
())
# shared.Functions.
test.removeSharedObject("e
xample")
@service.customMethod
(
"com.example.settingsd.sharedObject"
)
def
path
(
self
)
:
...
...
@@ -50,16 +54,16 @@ class Example(service.FunctionObject) :
##### Public classes #####
class
Service
(
service
.
Service
)
:
def
initService
(
self
)
:
shared
.
Functions
.
addShared
(
"
T
est"
)
shared
.
Functions
.
Test
.
addSharedObject
(
"Example"
,
Example
(
self
.
serviceName
()
,
self
))
shared
.
Functions
.
addShared
(
"
t
est"
)
shared
.
Functions
.
test
.
addSharedObject
(
SERVICE_NAME
,
Example
(
SERVICE_NAME
,
self
))
@classmethod
def
serviceName
(
self
)
:
return
"example"
return
SERVICE_NAME
@classmethod
def
options
(
self
)
:
return
[
(
self
.
serviceName
()
,
"hello_string"
,
"Hello, World!"
,
str
)
(
SERVICE_NAME
,
"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