Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
S
scom
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
scom
Commits
588e17a0
Kaydet (Commit)
588e17a0
authored
Şub 17, 2009
tarafından
Bahadır Kandemir
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
- Allow connecting to alternate destinations
- register/remove has timeout arguments
üst
bdfef0ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
+26
-8
README
api/README
+11
-0
__init__.py
api/comar/__init__.py
+15
-8
No files found.
api/README
Dosyayı görüntüle @
588e17a0
...
...
@@ -34,3 +34,14 @@ Asynchronous calls:
link.System.Service.info(async=handler)
mainloop.run()
Connecting COMAR service on alternate destination:
import comar
link = comar.Link(alternate=True)
This will simply try to connect tr.org.pardus.comar2 instead
of tr.org.pardus.comar
COMAR 3.0's primary destination is tr.org.pardus.comar3 and
alternate destination is tr.org.pardus.comar3.updated
api/comar/__init__.py
Dosyayı görüntüle @
588e17a0
...
...
@@ -140,7 +140,7 @@ class Call:
class
Link
:
def
__init__
(
self
,
version
=
"2"
,
socket
=
None
):
def
__init__
(
self
,
version
=
"2"
,
socket
=
None
,
alternate
=
False
):
self
.
version
=
str
(
version
)
self
.
address
=
"tr.org.pardus.comar"
self
.
interface
=
"tr.org.pardus.comar"
...
...
@@ -151,9 +151,16 @@ class Link:
else
:
self
.
bus
=
dbus
.
bus
.
BusConnection
(
address_or_type
=
"unix:path=
%
s"
%
socket
)
if
self
.
version
==
"3"
:
self
.
address
+=
self
.
version
self
.
interface
+=
self
.
version
if
alternate
:
if
self
.
version
==
"2"
:
self
.
address
+=
self
.
version
elif
self
.
version
==
"3"
:
self
.
address
+=
self
.
version
+
".updated"
self
.
interface
+=
self
.
version
else
:
if
self
.
version
==
"3"
:
self
.
address
+=
self
.
version
self
.
interface
+=
self
.
version
def
setLocale
(
self
):
if
self
.
version
!=
"3"
:
...
...
@@ -171,13 +178,13 @@ class Link:
handler
(
package
,
signal
,
args
)
self
.
bus
.
add_signal_receiver
(
sigHandler
,
dbus_interface
=
"
%
s.
%
s"
%
(
self
.
interface
,
model
),
member_keyword
=
"signal"
,
path_keyword
=
"path"
)
def
register
(
self
,
app
,
model
,
script
):
def
register
(
self
,
app
,
model
,
script
,
timeout
=
120
):
obj
=
self
.
bus
.
get_object
(
self
.
address
,
'/'
,
introspect
=
False
)
obj
.
register
(
app
,
model
,
script
,
dbus_interface
=
self
.
interface
)
obj
.
register
(
app
,
model
,
script
,
dbus_interface
=
self
.
interface
,
timeout
=
timeout
)
def
remove
(
self
,
app
):
def
remove
(
self
,
app
,
timeout
=
120
):
obj
=
self
.
bus
.
get_object
(
self
.
address
,
'/'
,
introspect
=
False
)
obj
.
remove
(
app
,
dbus_interface
=
self
.
interface
)
obj
.
remove
(
app
,
dbus_interface
=
self
.
interface
,
timeout
=
timeout
)
def
__getattr__
(
self
,
name
):
if
name
[
0
]
<
'A'
or
name
[
0
]
>
'Z'
:
...
...
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