[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: a2194be3cb1b099d612134d3390ef11aa68db4da
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:25:12 CET 2014
The branch, build-baikal has been updated
via a2194be3cb1b099d612134d3390ef11aa68db4da (commit)
from 9e319fe033d01a7296a67cbfd816982f5f596fd4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2go/client.py | 90 ++++++++++++++++++--------------------------------------
1 file changed, 28 insertions(+), 62 deletions(-)
The diff of changes is:
diff --git a/x2go/client.py b/x2go/client.py
index 2eeee42..137ca65 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -120,7 +120,7 @@ class X2goClient(object):
self.session_profiles = X2goSessionProfiles(logger=self.logger)
self.session_registry = X2goSessionRegistry(logger=self.logger)
- def get_username(self, session_hash):
+ def __get_username(self, session_hash):
"""\
After a session has been setup up you can query the
username the sessions runs as.
@@ -133,8 +133,9 @@ class X2goClient(object):
"""
return self.session_registry(session_hash).session_object.get_transport().get_username()
+ get_username = __get_username
- def get_server(self, session_hash):
+ def __get_server(self, session_hash):
"""\
After a session has been setup up you can query the
hostname of the host the sessions is connected to (or
@@ -149,8 +150,9 @@ class X2goClient(object):
"""
return self.session_registry(session_hash).session_object.get_transport().getpeername()
+ get_server = __get_server
- def register_session(self, server=None, profile_id=None, profile_name=None, custom_profile_name=None,
+ def __register_session(self, server=None, profile_id=None, profile_name=None, custom_profile_name=None,
printing=False, share_local_folders=[], **kwargs):
"""\
Register a new X2go client session. Within one X2goClient
@@ -206,8 +208,9 @@ class X2goClient(object):
self.logger('initializing X2go session...', log.loglevel_NOTICE)
return session_uuid
+ register_session = __register_session
- def get_session(self, session_uuid):
+ def __get_session(self, session_uuid):
"""\
Retrieve the complete X2goSession object that has been
registry under the given sesion registry hash.
@@ -220,9 +223,10 @@ class X2goClient(object):
"""
return self.session_registry(session_uuid).session_object
- with_session = get_session
+ get_session = __get_session
+ with_session = __get_session
- def get_session_name(self, session_uuid):
+ def __get_session_name(self, session_uuid):
"""\
Retrieve the server-side X2go session name for the session that has
been registered under C{profile_id}.
@@ -235,6 +239,7 @@ class X2goClient(object):
"""
return self.session_registry(session_uuid).session_object.session_info
+ get_session_name = __get_session_name
def __connect_session(self, session_uuid, password=None, add_to_known_hosts=False, force_password_auth=False):
"""\
@@ -265,7 +270,7 @@ class X2goClient(object):
self.session_registry(session_uuid).connected = True
connect_session = __connect_session
- def __session_print_action(self, session_uuid, print_action, **kwargs):
+ def __set_session_print_action(self, session_uuid, print_action, **kwargs):
"""\
STILL UNDOCUMENTED
@@ -273,7 +278,7 @@ class X2goClient(object):
if type(print_action) is not types.StringType:
return False
self.with_session(session_uuid).set_print_action(print_action, **kwargs)
- session_print_action = __session_print_action
+ set_session_print_action = __set_session_print_action
def __start_session(self, session_uuid):
"""\
@@ -410,62 +415,23 @@ class X2goClient(object):
self.session_registry(session_uuid).terminated = True
terminate_session = __terminate_session
- ###
- ### PROFILE ORIENTED CODE
- ###
-
- def __has_session_profile(self, profile_name):
+ def __get_session_profile(self, session_hash):
"""\
- STILL UNDOCUMENTED
-
-
- """
- return self.session_profiles.has_profile(profile_name)
- has_session_profile = __has_session_profile
+ Retrieve the complete X2goSession object that has been
+ registry under the given sesion registry hash.
- def __get_session_profiles(self):
- """\
- STILL UNDOCUMENTED
+ @param session_hash: the X2go session's UUID registry hash
+ @type session_hash: str
+ @return: the L{X2goSession} object
+ @rtype: obj
"""
- _ret = {}
- for _profile_id in self.session_profiles.profile_ids:
- _ret[_profile_id] = self.session_profiles.get_profile_config()
- return _ret
- get_session_profiles = __get_session_profiles
-
-# def new_session_profile(self, profile_name='NEW_SESSION_PROFILE', **kwargs):
-# """\
-# STILL UNDOCUMENTED
-#
-# @param profile_name: name of a session profile to load from your session
-# config
-# @type profile_name: str
-#
-# @return: a unique identifier (UUID) for the newly registered X2go session
-# @rtype: str
-#
-# """
-# profile = self.session_profiles.new_profile(profile_name=profile_name, **kwargs)
-# return self.register_profile(profile)
-#
-# def get_session_profile(self, session_hash):
-# """\
-# Retrieve the complete X2goSession object that has been
-# registry under the given sesion registry hash.
-#
-# @param session_hash: the X2go session's UUID registry hash
-# @type session_hash: str
-#
-# @return: the L{X2goSession} object
-# @rtype: obj
-#
-# """
-# return self.session_registry[session_hash]['profile']
-# with_profile = get_session_profile
-#
- def get_session_profile_name(self, session_uuid):
+ return self.session_registry[session_hash]['profile']
+ get_session_profile = __get_session_profile
+ with_session_profile = __get_session_profile
+
+ def __get_session_profile_name(self, session_uuid):
"""\
Retrieve the profile name of the session that has been registered
under C{session_hash}
@@ -479,9 +445,9 @@ class X2goClient(object):
"""
return self.session_registry(session_uuid).profile_name
- get_profile_name = get_session_profile_name
+ get_session_profile_name = __get_session_profile_name
- def get_session_profile_id(self, profile_name):
+ def __get_session_profile_id(self, profile_name):
"""\
Retrieve the session profile id of the session whose profile name
is C{profile_name}
@@ -494,7 +460,7 @@ class X2goClient(object):
"""
return self.session_registry(profile_name).profile_id
- get_profile_id = get_session_profile_id
+ get_session_profile_id = __get_session_profile_id
###
### QUERYING INFORMATION
hooks/post-receive
--
python-x2go.git (Python X2Go Client API)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).
More information about the x2go-commits
mailing list