Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

Version 30 (modified by mshkutkov, 16 years ago) (diff)

--

Overview

The goal of this project is to extend the existing logging subsystem of libpurple. This extension allows you to safely store your logs on different types of repositories and synchronize your logs with remote ones. With this extension you don't need to copy valuable information from your computer to external devices any more. You can forget about mailing your own logs to your own mailbox to have access to them from some other place. With this extension you can stop worrying about the hardware failures - because whatever happens with your computer, your logs will be safe.

Tasks

  • QIP logger.
  • Making non-blocking Pidgin Log API:
    • nonblocking analogue of purple_log_get_logs
    • nonblocking analogue of purple_log_get_size
    • nonblocking analogue of purple_log_get_total_size
    • nonblocking analogue of purple_log_write
    • nonblocking analogue of purple_log_read
    • nonblocking analogue of purple_log_get_log_sets
    • nonblocking analogue of purple_log_get_system_logs
    • nonblocking analogue of purple_log_is_deletable
    • nonblocking analogue of purple_log_delete
    • nonblocking analogue of purple_log_free
  • Rewriting existing code for using nonblocking log's functions.
    • pidgin/gtklog.c
      • pidgin_log_show
      • pidgin_syslog_show
      • pidgin_log_show_contact
      • destroy_cb
      • search_cb
      • delete_log_cb
      • log_show_popup_menu
      • log_select_cb
    • pidgin/plugins/history.c
      • historize
    • pidgin/gtkutils.c
      • add_completion_list
    • pidgin/gtkblist.c
      • sort_method_log
    • libpurple/status.c
      • notify_buddy_status_update
      • update_buddy_idle
      • purple_presence_set_idle
    • libpurple/protocols/qq/sys_msg.c
      • _qq_sys_msg_log_write
    • libpurple/conversation.c
      • purple_conversation_close_logs
      • purple_conversation_write
    • libpurple/connection.c
      • purple_connection_set_state
    • libpurple/account.c
      • purple_account_destroy
      • purple_account_destroy_log
    • finch/plugins/gnthistory.c
      • historize
    • finch/gntblist.c
      • get_contact_log_size
      • blist_node_compare_log
  • Writing database plugin, which would allow you to store your Pidgin logs in databases. This plugin will be the first, because database plugin is rather common request and it's great for business use cases. (*)
    • database_logger_write
    • database_logger_list
    • database_logger_read
    • database_logger_size
    • database_logger_total_size
    • database_logger_list_syslog
    • database_logger_sets
    • database_logger_remove_log

Optional features (which maybe not be implemented during the summer)

  • Ftp plug-in.
  • Gmail plug-in
  • External tool which allow simple manage your remote repository without Pidgin. (e.g. “Database log manager” or “FTP log manager”)

Database Tables

  • protocols
    • id: integer (PK)
    • name: string
  • accounts
    • id: integer (PK)
    • name: string
    • protocolId: integer (FK)
  • buddies
    • id: integer (PK)
    • name: string
    • type: integer
    • accountId: integer (FK)
  • conversations
    • id: integer (PK)
    • datetime: integer
    • size: integer
    • accountId: integer (FK)
    • buddyId integer (FK)
  • messages
    • id: integer (PK)
    • conversationId: integer (FK)
    • ownerName: string
    • datetime: integer
    • text: string
    • flags: integer

Supported database engines

Database Logger uses libdbi, so expected that it will support several database engines, such as Firebird/Interbase?, FreeTDS (provides access to MS SQL Server and Sybase), MySQL, PostgreSQL, SQLite/SQLite3.

At present moment I'm working with MySQL database.

MySQL

DROP TABLE IF EXISTS `protocols`;
CREATE TABLE `protocols` (
  `id` int NOT NULL auto_increment,
  `name` VARCHAR(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=UTF8;

DROP TABLE IF EXISTS `accounts`;
CREATE TABLE `accounts` (
  `id` int NOT NULL auto_increment,
  `name` VARCHAR(255) NOT NULL,
  `protocolId` int NOT NULL REFERENCES protocols(`id`),
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=UTF8;

DROP TABLE IF EXISTS `buddies`;
CREATE TABLE `buddies` (
  `id` int NOT NULL auto_increment,
  `name` VARCHAR(255) NOT NULL,
  `type` int,
  `accountId` int NOT NULL REFERENCES accounts(`id`),
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=UTF8;

DROP TABLE IF EXISTS `conversations`;
CREATE TABLE `conversations` (
  `id` int NOT NULL auto_increment,
  `datetime` int,
  `size` int,
  `accountId` int NOT NULL REFERENCES accounts(`id`),
  `buddyId` int NOT NULL REFERENCES buddies(`id`),
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=UTF8;

DROP TABLE IF EXISTS `messages`;
CREATE TABLE `messages` (
  `id` int NOT NULL auto_increment,
  `conversationId` int NOT NULL REFERENCES conversations(`id`),
  `ownerName` VARCHAR(255) NOT NULL,
  `datetime` int,
  `text` LONGTEXT NOT NULL,
  `flags` int,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=UTF8;


  • - current work
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!