Add manifest and fix packaging
[profile/ivi/libgsignon-glib.git] / pygobject / Signon.py
1 from ..overrides import override
2 from ..importer import modules
3 from gi.repository import GObject
4
5 Signon = modules['Signon']._introspection_module
6
7 __all__ = []
8
9 class GStrv(list):
10     __gtype__ = GObject.type_from_name('GStrv')
11
12 class AuthSession(Signon.AuthSession):
13
14     # Convert list of strings into a GStrv
15     def process(self, session_data, mechanism, callback, userdata):
16         cleaned_data = {}
17         for (key, value) in session_data.items():
18             if isinstance(value, list):
19                 cleaned_data[key] = GStrv(value)
20             else:
21                 cleaned_data[key] = value
22         Signon.AuthSession.process(self, cleaned_data, mechanism, callback, userdata)
23
24 AuthSession = override(AuthSession)
25 __all__.append('AuthSession')
26