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
2da547e3
Commit
2da547e3
authored
Jan 19, 2011
by
Devaev Maxim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbus_tools and tools now a tools packages
parent
72bd102f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
12 deletions
+16
-12
service.py
settingsd/service.py
+4
-4
service_decorators.py
settingsd/service_decorators.py
+6
-6
__init__.py
settingsd/tools/__init__.py
+5
-0
dbus.py
settingsd/tools/dbus.py
+0
-0
process.py
settingsd/tools/process.py
+1
-2
No files found.
settingsd/service.py
View file @
2da547e3
...
@@ -9,8 +9,8 @@ import abc
...
@@ -9,8 +9,8 @@ import abc
import
const
import
const
import
config
import
config
import
shared
import
shared
import
dbus_tools
import
logger
import
logger
import
tools.dbus
from
service_decorators
import
*
from
service_decorators
import
*
...
@@ -77,7 +77,7 @@ class CustomObject(dbus.service.Object) :
...
@@ -77,7 +77,7 @@ class CustomObject(dbus.service.Object) :
def
build_path
(
shared
)
:
def
build_path
(
shared
)
:
if
shared
!=
None
:
if
shared
!=
None
:
path
=
build_path
(
shared
.
parentShared
())
path
=
build_path
(
shared
.
parentShared
())
return
(
shared
.
name
()
if
path
==
None
else
dbus_tool
s
.
joinMethod
(
path
,
shared
.
name
())
)
return
(
shared
.
name
()
if
path
==
None
else
tools
.
dbu
s
.
joinMethod
(
path
,
shared
.
name
())
)
return
None
return
None
return
build_path
(
self
.
shared
())
return
build_path
(
self
.
shared
())
...
@@ -109,11 +109,11 @@ class CustomObject(dbus.service.Object) :
...
@@ -109,11 +109,11 @@ class CustomObject(dbus.service.Object) :
class
FunctionObject
(
CustomObject
)
:
class
FunctionObject
(
CustomObject
)
:
def
__init__
(
self
,
object_path
,
service_object
=
None
)
:
def
__init__
(
self
,
object_path
,
service_object
=
None
)
:
CustomObject
.
__init__
(
self
,
dbus_tool
s
.
joinPath
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_path"
),
CustomObject
.
__init__
(
self
,
tools
.
dbu
s
.
joinPath
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_path"
),
"functions"
,
object_path
),
service_object
)
"functions"
,
object_path
),
service_object
)
class
ActionObject
(
CustomObject
)
:
class
ActionObject
(
CustomObject
)
:
def
__init__
(
self
,
object_path
,
service_object
=
None
)
:
def
__init__
(
self
,
object_path
,
service_object
=
None
)
:
CustomObject
.
__init__
(
self
,
dbus_tool
s
.
joinPath
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_path"
),
CustomObject
.
__init__
(
self
,
tools
.
dbu
s
.
joinPath
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_path"
),
"actions"
,
object_path
),
service_object
)
"actions"
,
object_path
),
service_object
)
settingsd/service_decorators.py
View file @
2da547e3
...
@@ -7,8 +7,8 @@ import dbus.glib
...
@@ -7,8 +7,8 @@ import dbus.glib
import
const
import
const
import
config
import
config
import
dbus_tools
import
logger
import
logger
import
tools.dbus
##### Private decorators #####
##### Private decorators #####
...
@@ -18,7 +18,7 @@ def tracer(function, statics_list=[0]) :
...
@@ -18,7 +18,7 @@ def tracer(function, statics_list=[0]) :
logger
.
debug
(
"
%
s
%
s
%
s::
%
s"
%
(
" "
*
statics_list
[
0
],
logger
.
debug
(
"
%
s
%
s
%
s::
%
s"
%
(
" "
*
statics_list
[
0
],
str
((
function
.
__dict__
.
has_key
(
"_dbus_is_method"
)
and
"Called method"
)
or
str
((
function
.
__dict__
.
has_key
(
"_dbus_is_method"
)
and
"Called method"
)
or
(
function
.
__dict__
.
has_key
(
"_dbus_is_signal"
)
and
"Emited signal"
)),
(
function
.
__dict__
.
has_key
(
"_dbus_is_signal"
)
and
"Emited signal"
)),
self
.
objectPath
(),
dbus_tool
s
.
joinMethod
(
function
.
_dbus_interface
,
function
.
__name__
)
))
self
.
objectPath
(),
tools
.
dbu
s
.
joinMethod
(
function
.
_dbus_interface
,
function
.
__name__
)
))
statics_list
[
0
]
+=
1
statics_list
[
0
]
+=
1
try
:
try
:
...
@@ -55,13 +55,13 @@ def customMethod(interface_name, **kwargs_dict) :
...
@@ -55,13 +55,13 @@ def customMethod(interface_name, **kwargs_dict) :
def
functionMethod
(
interface_name
,
**
kwargs_dict
)
:
def
functionMethod
(
interface_name
,
**
kwargs_dict
)
:
def
decorator
(
function
)
:
def
decorator
(
function
)
:
return
customMethod
(
dbus_tool
s
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
return
customMethod
(
tools
.
dbu
s
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
"functions"
,
interface_name
),
**
kwargs_dict
)(
function
)
"functions"
,
interface_name
),
**
kwargs_dict
)(
function
)
return
decorator
return
decorator
def
actionMethod
(
interface_name
,
**
kwargs_dict
)
:
def
actionMethod
(
interface_name
,
**
kwargs_dict
)
:
def
decorator
(
function
)
:
def
decorator
(
function
)
:
return
customMethod
(
dbus_tool
s
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
return
customMethod
(
tools
.
dbu
s
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
"actions"
,
interface_name
),
**
kwargs_dict
)(
function
)
"actions"
,
interface_name
),
**
kwargs_dict
)(
function
)
return
decorator
return
decorator
...
@@ -74,13 +74,13 @@ def customSignal(interface_name, **kwargs_dict) :
...
@@ -74,13 +74,13 @@ def customSignal(interface_name, **kwargs_dict) :
def
functionSignal
(
interface_name
,
**
kwargs_dict
)
:
def
functionSignal
(
interface_name
,
**
kwargs_dict
)
:
def
decorator
(
function
)
:
def
decorator
(
function
)
:
return
customSignal
(
dbus_tool
s
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
return
customSignal
(
tools
.
dbu
s
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
"functions"
,
interface_name
),
**
kwargs_dict
)(
function
)
"functions"
,
interface_name
),
**
kwargs_dict
)(
function
)
return
decorator
return
decorator
def
actionSignal
(
interface_name
,
**
kwargs_dict
)
:
def
actionSignal
(
interface_name
,
**
kwargs_dict
)
:
def
decorator
(
function
)
:
def
decorator
(
function
)
:
return
customSignal
(
dbus_tool
s
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
return
customSignal
(
tools
.
dbu
s
.
joinMethod
(
config
.
value
(
config
.
APPLICATION_SECTION
,
"service_name"
),
"actions"
,
interface_name
),
**
kwargs_dict
)(
function
)
"actions"
,
interface_name
),
**
kwargs_dict
)(
function
)
return
decorator
return
decorator
settingsd/tools/__init__.py
0 → 100644
View file @
2da547e3
# -*- coding: utf-8 -*-
__all__
=
[
"dbus"
,
"process"
]
settingsd/
dbus_tool
s.py
→
settingsd/
tools/dbu
s.py
View file @
2da547e3
File moved
settingsd/tools.py
→
settingsd/tools
/process
.py
View file @
2da547e3
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
subprocess
import
subprocess
import
logger
from
..
import
logger
##### Exceptions #####
##### Exceptions #####
...
...
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