TOXYGEN
 All Classes Functions
Public Member Functions | Static Public Attributes | List of all members
toxygen.plugins.plugin_super_class.PluginSuperClass Class Reference
Inheritance diagram for toxygen.plugins.plugin_super_class.PluginSuperClass:
toxygen.plugins.awayl.AutoAwayStatusLinux toxygen.plugins.awayw.AutoAwayStatusWindows toxygen.plugins.bday.BirthDay toxygen.plugins.bot.Bot toxygen.plugins.mrq.MarqueeStatus toxygen.plugins.srch.SearchPlugin toxygen.plugins.toxid.CopyableToxId

Public Member Functions

def __init__
 
def get_name
 
def get_short_name
 
def get_description
 
def get_menu
 
def get_message_menu
 
def get_window
 
def set_tox
 
def start
 
def stop
 
def close
 
def command
 
def load_translator
 
def load_settings
 
def save_settings
 
def lossless_packet
 
def lossy_packet
 
def friend_connected
 
def send_lossless
 
def send_lossy
 

Static Public Attributes

 is_plugin = True
 

Detailed Description

Superclass for all plugins. Plugin is python module with at least one class derived from PluginSuperClass.

Constructor & Destructor Documentation

def toxygen.plugins.plugin_super_class.PluginSuperClass.__init__ (   self,
  name,
  short_name,
  tox = None,
  profile = None,
  settings = None,
  encrypt_save = None 
)
Constructor. In plugin __init__ should take only 4 last arguments
:param name: plugin full name
:param short_name: plugin unique short name (length of short name should not exceed MAX_SHORT_NAME_LENGTH)
:param tox: tox instance
:param profile: profile instance
:param settings: profile settings
:param encrypt_save: LibToxEncryptSave instance.

Member Function Documentation

def toxygen.plugins.plugin_super_class.PluginSuperClass.close (   self)
App is closing
def toxygen.plugins.plugin_super_class.PluginSuperClass.command (   self,
  command 
)
New command. On 'help' this method should provide user list of available commands
:param command: string with command
def toxygen.plugins.plugin_super_class.PluginSuperClass.friend_connected (   self,
  friend_number 
)
Friend with specified number is online now
def toxygen.plugins.plugin_super_class.PluginSuperClass.get_description (   self)
Should return plugin description
def toxygen.plugins.plugin_super_class.PluginSuperClass.get_menu (   self,
  menu,
  row_number 
)
This method creates items for menu which called on right click in list of friends
:param menu: menu instance
:param row_number: number of selected row in list of contacts
:return list of QAction's
def toxygen.plugins.plugin_super_class.PluginSuperClass.get_message_menu (   self,
  menu,
  text 
)
This method creates items for menu which called on right click in message
:param menu: menu instance
:param text: selected text
:return list of QAction's
def toxygen.plugins.plugin_super_class.PluginSuperClass.get_name (   self)
:return plugin full name
def toxygen.plugins.plugin_super_class.PluginSuperClass.get_short_name (   self)
:return plugin unique (short) name
def toxygen.plugins.plugin_super_class.PluginSuperClass.get_window (   self)
This method should return window for plugins with GUI or None
def toxygen.plugins.plugin_super_class.PluginSuperClass.load_settings (   self)
This method loads settings of plugin and returns raw data
def toxygen.plugins.plugin_super_class.PluginSuperClass.load_translator (   self)
This method loads translations for GUI
def toxygen.plugins.plugin_super_class.PluginSuperClass.lossless_packet (   self,
  data,
  friend_number 
)
Incoming lossless packet
:param data: string with data
:param friend_number: number of friend who sent packet
def toxygen.plugins.plugin_super_class.PluginSuperClass.lossy_packet (   self,
  data,
  friend_number 
)
Incoming lossy packet
:param data: string with data
:param friend_number: number of friend who sent packet
def toxygen.plugins.plugin_super_class.PluginSuperClass.save_settings (   self,
  data 
)
This method saves plugin's settings to file
:param data: string with data
def toxygen.plugins.plugin_super_class.PluginSuperClass.send_lossless (   self,
  data,
  friend_number 
)
This method sends lossless packet to friend
Wrapper for self._tox.friend_send_lossless_packet
Use it instead of direct using self._tox.friend_send_lossless_packet
:return True on success
def toxygen.plugins.plugin_super_class.PluginSuperClass.send_lossy (   self,
  data,
  friend_number 
)
This method sends lossy packet to friend
Wrapper for self._tox.friend_send_lossy_packet
Use it instead of direct using self._tox.friend_send_lossy_packet
:return True on success
def toxygen.plugins.plugin_super_class.PluginSuperClass.set_tox (   self,
  tox 
)
New tox instance
def toxygen.plugins.plugin_super_class.PluginSuperClass.start (   self)
This method called when plugin was started
def toxygen.plugins.plugin_super_class.PluginSuperClass.stop (   self)
This method called when plugin was stopped

The documentation for this class was generated from the following file: