Kopete via dbus

Bug #479159 reported by Jiří Dudek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NDesk D-Bus
New
Undecided
Unassigned

Bug Description

Hello,
i cannot obtain contact properties from Kopete via dbus. I am using the current version from ubuntu karmic (Dbus 0.6.0.3 , DBus glib 0.4.1).The listing of contacts and obtaining name working without any troubles. The exception is :
Unhandled Exception: System.Exception: Read pos 316 != ep 313
  at NDesk.DBus.MessageReader.ReadArray (System.Type elemType) [0x00000]
  at NDesk.DBus.MessageReader.ReadValue (System.Type type) [0x00000]
  at NDesk.DBus.MessageReader.ReadStruct (System.Type type) [0x00000]
  at NDesk.DBus.MessageReader.ReadValue (System.Type type) [0x00000]
  at NDesk.DBus.MessageHelper.GetDynamicValues (NDesk.DBus.Message msg, System.Type[] types) [0x00000]
  at NDesk.DBus.BusObject.SendMethodCall (System.String iface, System.String member, System.String inSigStr, NDesk.DBus.MessageWriter writer, System.Type retType, System.Exception& exception) [0x00000]
  at KopeteProxy.contactProperties (System.String ) [0x00000]
  at DBusTest.MainClass.Main (System.String[] args) [0x00052] in /home/jdk/privateProjects/DBusTest/DBusTest/Main.cs:23

The source code is :

using System;
//using GLib;
using Gtk;
using NDesk.DBus;
using org.freedesktop.DBus;
using System.Collections;
using System.Collections.Generic;

namespace DBusTest
{
 class MainClass
 {
  public static void Main(string[] args)
  {
   BusG.Init ();
      Application.Init ();
   Bus bus = Bus.Session;
   ObjectPath path = new ObjectPath ("/Kopete");
         Kopete demo = bus.GetObject<Kopete> ("org.kde.kopete", path);
   string[] c = demo.contacts();
   foreach(String id in c){
    Console.WriteLine("ID : " + id);
    Console.WriteLine(demo.contactProperties(id));
    }

  }
 }
}

[Interface("org.kde.Kopete")]
public interface Kopete {

    void connectAll();
    void disconnectAll();
    bool isConnected(string protocolName, string accountId);
    void connect(string protocolName, string accountId);
    void disconnect(string protocolName, string accountId);
    string[] protocols();
    string[] identities();
    string[] accounts();
    string[] contacts();
    string labelForIdentity(string identity);
    string[] contactsByFilter(string filter);
    void setIdentityNickName(string nickName, string identityId);
    void setIdentityNickName(string nickName);
    void setIdentityAvatar(string avatarUrl, string identityId);
    void setIdentityAvatar(string avatarUrl);
    void setIdentityOnlineStatus(string status, string message, string identityId);
    void setIdentityOnlineStatus(string status, string message);
    void setOnlineStatus(string status, string message);
    void setOnlineStatus(string status);
    void setStatusMessage(string message);
    void sendMessage(string contactId, string message);
    bool addContact(string protocolName, string accountId, string contactId, string displayName, string groupName);
    bool addContact(string protocolName, string accountId, string contactId, string displayName);
    void sendFile(string contactId, string fileUrl);
    string getDisplayName(string contactId);
    bool isContactOnline(string contactId);
    void openChat(string contactID);
    Dictionary<string, object> contactProperties(string contactId);
    //event EventHandler<string> contactChanged;
}

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.