#NEWLINE# @ staticmethod #NEWLINE# @ ffi . callback ( 'void(sp_session *, const char *)' ) #NEWLINE# def message_to_user( sp_session , data ) : #NEWLINE# #INDENT# if ( not spotify . _session_instance ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# data = utils . to_unicode ( data ) . strip ( ) #NEWLINE# logger . debug ( 'Message to user: %s' , sp_session ) #NEWLINE# spotify . _session_instance . emit ( SessionEvent . MESSAGE_TO_USER , spotify . _session_instance , data )