Hi, i want to write a wrapper to make the Kopete Protocol plugins clompliant to the Telepathy spec for a later integration of Decibel.
I tried to find the corresponding counterparts of the Kopete-Api to the functions of the Telepathy-Spec. The Telepathy functions that are just needed internally I left out of here. Please let me know when I got sth. wrong or missed sth. Telepathy.ConnectionManager =========================== Through this Class Connection-Objects can be requested. An open question here would be if one ConnectionManager should be implemented per protocol or one CM for all protocols. >From the view of rebustness I think it would maybe be better to implement one CM per protocol, because one CM is started as one process. Functions: ---------- QString RequestConnection(QString proto, QVariantMap parameters, QDBusObjectPath &object_path) possible parameters: s:account, s:server, q:port, s:password, b:require-encryption, b:register, s:ident, s:fullname /* Dont know if these are really needed for Kopete s:stun-server The IP address or FQDN of a STUN server to use for NAT traversal, without any ":port" suffix. q:stun-port The UDP port number on the stun-server to use for STUN. Only significant if the stun-server is also supplied. */ The parameters are fetched with --> KConfigGroup* Kopete::Account::configGroup() Telepathy.Connection ==================== This Class represents a connection to a communication server with the parameters from a above requested connection with Telepathy.ConnectionManager.RequestConnection Functions: ---------- void Connect() Establishes the connection to the communication server. --> void Kopete::Account::connect( const Kopete::OnlineStatus &initialStatus = OnlineStatus() ) void Disconnect() Request that the connection be closed if not already in diconnected state and destroys the connection object. --> void Kopete::Account::disconnect() QStringList GetInterfaces() Get the optional interfaces supported by this connection. --> Anyone an idea? uint GetStatus() Get the current status as defined in the StatusChanged signal. Status can be one of the following: Connected, Connecting, Disconnected This has nothing to do with the Online-Status, that is handled through Telepathy.Connection.Interface.Presence --> Couldn't find Kopete counterpart, maybe this is only needed Telepathy internally QDBusObjectPath RequestChannel(const QString &type, uint handle_type, uint handle, bool suppress_handler) Request a channel satisfying the specified type and communicating with the contact, room, list etc. indicated by the given handle_type and handle. Handle- (Channel-) Type can be one of the following: contact, chat room, server-generated contact list, user-defined contact list I guess here the Kopete counterpart depends on which type of channel is requested for which protocol. For example Jabber: --> Channel-Type Contact: Kopete::ChatSession with a JabberContact --> Channel-Type Chat-Room: Kopete::ChatSession with a JabberGroupContact As far as i can see getting the Contact-List from one Account is independent from Protocol. --> QHash< QString, Contact* >& Kopete::Account::contacts() Is server-generated or user-defined contact list differentiated in Kopete? Signals: -------- void NewChannel(QDBusObjectPath &object_path, QString &channel_type, uint handle_type, uint handle, bool suppress_handler) Emitted when a new Channel object is created, either through user request or incoming information from the service. --> void Kopete::ChatSessionManager::chatSessionCreated( Kopete::ChatSession* ) Telepathy.Connection.Interface.Aliasing ======================================= This methods are added to Telepathy.Connection when the protocol supports aliasing: Functions: ---------- QStringList RequestAliases( QList<uint> contacts ) Request the value of several contacts' aliases at once. --> QString Kopete::Contact::nickName() void SetAliases( QMap<uint,QString> aliases) Request that the aliases of the given contacts be changed. --> void Kopete::Contact::setNickName( const QString &name ) Telepathy.Connection.Interface.Presence ======================================= This methods are added to Telepathy.Connection when the protocol supports presence settings: Functions: ---------- Contact_Presences GetPresence(QList<uint> handles) Get presence previously emitted by PresenceUpdate for the given contacts. void RequestPresence(QList<uint> handles) Request the presence for contacts on this connection. A PresenceUpdate signal will be emitted when they are received. for last 2 functions --> OnlineStatus Kopete::Contact::onlineStatus() void SetStatus( QMap<QString, QVariantMap> statuses) Request that the user's presence be changed to the given statuses and desired parameters. --> void Kopete::Account::setOnlineStatus( Kopete::OnlineStatus &status, Kopete::StatusMessage &reason = Kopete::StatusMessage() ) Signals: -------- void PresenceUpdate( Contact_Presences presence ) This signal should be emitted when your own presence has been changed, or the presence of the member of any of the connection's channels has been changed, or when the presence requested by RequestPresence is available. --> void Kopete::Contact::onlineStatusChanged( Kopete::Contact *contact, Kopete::OnlineStatus &status, Kopete::OnlineStatus &oldStatus ) Telepathy.Channel.Type.Text =========================== A channel type for sending and receiving messages in plain text, with no formatting. In future specifications, channels for sending and receiving messages that can be reduced to plain text (i.e. formatted text) should also have this type. Functions: ---------- void Send(uint type, QString text) Request that a message be sent on this channel. E.g. for Jabber: --> void JabberClient::send( QString &packet ) Signals: -------- void Received( uint id, uint timestamp, uint sender, uint type, uint flags, QString text ) Signals that a message with the given id, timestamp, sender, type and text has been received on this channel. --> void messageReceived ( const XMPP::Message &message ) Telepathy.Channel.Interface.Group ================================= Interface for channels which have multiple members, and where the members of the channel can change during its lifetime. Functions: ---------- AddMembers ( QList<uint> contacts, QString message ) Invite all the given contacts into the channel, or accept requests for channel membership for contacts on the pending local list. --> Kopete::ChatSession::addContact() QList<uint> GetMembers() Returns an array of handles for the members of this channel. --> Kopete::ContactPtrList& Kopete::ChatSession::members() void RemoveMembers ( QList<uint> contacts, QString message ) Requests the removal of contacts from a channel, reject their request for channel membership on the pending local list, or rescind their invitation on the pending remote list. --> Kopete::ChatSession::removeContact() Signals: -------- void MembersChanged ( QString message, QList<uint> added, QList<uint> removed, QList<uint> local_pending, QList<uint> remote_pending, uint actor, uint reason ) Emitted when contacts join any of the three lists (members, local pending or remote pending). --> Kopete::ChatSession::contactAdded() --> Kopete::ChatSession::contactRemoved() Furthermore i guess the interfaces Telepathy.Channel.Type.Tubes / Telepathy.Channel.Type.StreamedMedia are needed for FileTransfer / VoIP. Greets Roman Bukovac _______________________________________________ kopete-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/kopete-devel
