def owner(self):
        user_struct = self.__container_interface.owner(self.__container_struct)

        if user_struct is not None:
            ui = _user.UserInterface()
            ui.add_ref(user_struct)
            return user.User(user_struct)
Example #2
0
    def as_user(self):
        #Increment reference count so it's not stolen from us
        user_struct = self.__link_interface.as_user(self.__link_struct)

        if user_struct is not None:
            ui = _user.UserInterface()
            ui.add_ref(user_struct)
            return user.User(user_struct)
Example #3
0
    def track_creator(self, index):
        user_struct = self.__playlist_interface.track_creator(
            self.__playlist_struct, index)

        if user_struct is not None:
            ui = _user.UserInterface()
            ui.add_ref(user_struct)
            return user.User(user_struct)
Example #4
0
    def user(self, onload=None):
        user_struct = self.__session_interface.user(self.__session_struct)

        if user_struct is not None:
            ui = _user.UserInterface()
            ui.add_ref(user_struct)
            user_obj = user.User(user_struct)

            if onload != None:
                self._user_callbacks.add_callback(user_obj.is_loaded, onload,
                                                  user_obj)

            return user_obj
Example #5
0
 def __init__(self, user_struct):
     self.__user_struct = user_struct
     self.__user_interface = _user.UserInterface()
     
     #Ref counting
     self.__user_interface.add_ref(self.__user_struct)