pidgin plugin dev support - problem in disconnecting account

View: New views
3 Messages — Rating Filter:   Alert me  

pidgin plugin dev support - problem in disconnecting account

by nuwan gunarahtna :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Hi All,
I have been waiting for a response to this from someone who know the pidgin in and out.
may be my question is not clear.
lets think like this.
there is a tick boxes in Account->Manage Account window to disconnect pidgin account.
now i need to perform the same functionality inside from the program.
So what are the relevant methods to do this. Program structure of my  plugin follows almost same program structure of Bonjour protocol implemented.

thanks 

---------- Forwarded message ----------
From: evanescent <coolnuwan@...>
Date: Wed, Sep 30, 2009 at 11:01 AM
Subject: pidgin crashes when account disconnected internally
To: support@..., devel@...


Hi,
I have developed a pidgin plugin that works almost like Bonjour.
In my program I need to disconnect an account calling relevant methods internally. i.e not by clicking the tick boxes given in the GUI.
What I have done so far in the program is that at the point where I want to disconnect the account I have called the following methods.
Although it disconnects the account it also leads some problems such as
1) tick box remain ticked when next time I open Account->Manage Account window.
2)Occasionally pidgin crashes.

[code]

somemethod()
{
          // some code
      
        if(connection)
        {
          bonjour_close(connection);
          purple_connection_destroy(connection);
        }
        connection = NULL;
}
[/code]

what has gone wrong with this sequence ?


thanks.


_______________________________________________
Devel mailing list
Devel@...
http://pidgin.im/cgi-bin/mailman/listinfo/devel

Parent Message unknown Re: pidgin plugin dev support - problem in disconnecting account

by nuwan gunarahtna :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message



On Thu, Oct 1, 2009 at 4:05 PM, Felix Kerekes <sttwister@...> wrote:


On Thu, Oct 1, 2009 at 7:45 AM, evanescent <coolnuwan@...> wrote:
Hi All,
I have been waiting for a response to this from someone who know the pidgin in and out.
may be my question is not clear.
lets think like this.
there is a tick boxes in Account->Manage Account window to disconnect pidgin account.
now i need to perform the same functionality inside from the program.
So what are the relevant methods to do this. Program structure of my  plugin follows almost same program structure of Bonjour protocol implemented.

thanks 

---------- Forwarded message ----------
From: evanescent <coolnuwan@...>
Date: Wed, Sep 30, 2009 at 11:01 AM
Subject: pidgin crashes when account disconnected internally
To: support@..., devel@...


Hi,
I have developed a pidgin plugin that works almost like Bonjour.
In my program I need to disconnect an account calling relevant methods internally. i.e not by clicking the tick boxes given in the GUI.
What I have done so far in the program is that at the point where I want to disconnect the account I have called the following methods.
Although it disconnects the account it also leads some problems such as
1) tick box remain ticked when next time I open Account->Manage Account window.
2)Occasionally pidgin crashes.

[code]

somemethod()
{
          // some code
      
        if(connection)
        {
          bonjour_close(connection);
          purple_connection_destroy(connection);
        }
        connection = NULL;
}
[/code]

what has gone wrong with this sequence ?


thanks. 

purple_account_set_enabled() should be used to toggle the checkboxes in the Accounts dialog.


Hi,
thanks for the pointing it out.
now I called the method purple_account_set_enabled() from my main source file of purple plugin protocol.
in order to call this method the header file of the method needed to include.
So I included core.h to call purple_core_get_ui() in order to passe as a method parameter to purple_account_set_enabled().


But when i compile the program i get the following error.

/usr/local/include/libpurple/core.h:62: error: expected specifier-qualifier-list before ‘GHashTable’
/usr/local/include/libpurple/core.h:83: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘purple_core_init’
/usr/local/include/libpurple/core.h:110: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘purple_core_quit_cb’
/usr/local/include/libpurple/core.h:157: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘purple_core_migrate’
/usr/local/include/libpurple/core.h:170: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘purple_core_ensure_single_instance’
/usr/local/include/libpurple/core.h:197: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
make: *** [libsallapa.dll] Error 1

what would be possible cause to this ?
thanks

 


_______________________________________________
Devel mailing list
Devel@...
http://pidgin.im/cgi-bin/mailman/listinfo/devel

Re: pidgin plugin dev support - problem in disconnecting account

by nuwan gunarahtna :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Happily I could able to overcome.
when i inlude the core.h at the bottom of inlusions it worked fine.

thanks

On Thu, Oct 1, 2009 at 4:43 PM, evanescent <coolnuwan@...> wrote:


On Thu, Oct 1, 2009 at 4:05 PM, Felix Kerekes <sttwister@...> wrote:


On Thu, Oct 1, 2009 at 7:45 AM, evanescent <coolnuwan@...> wrote:
Hi All,
I have been waiting for a response to this from someone who know the pidgin in and out.
may be my question is not clear.
lets think like this.
there is a tick boxes in Account->Manage Account window to disconnect pidgin account.
now i need to perform the same functionality inside from the program.
So what are the relevant methods to do this. Program structure of my  plugin follows almost same program structure of Bonjour protocol implemented.

thanks 

---------- Forwarded message ----------
From: evanescent <coolnuwan@...>
Date: Wed, Sep 30, 2009 at 11:01 AM
Subject: pidgin crashes when account disconnected internally
To: support@..., devel@...


Hi,
I have developed a pidgin plugin that works almost like Bonjour.
In my program I need to disconnect an account calling relevant methods internally. i.e not by clicking the tick boxes given in the GUI.
What I have done so far in the program is that at the point where I want to disconnect the account I have called the following methods.
Although it disconnects the account it also leads some problems such as
1) tick box remain ticked when next time I open Account->Manage Account window.
2)Occasionally pidgin crashes.

[code]

somemethod()
{
          // some code
      
        if(connection)
        {
          bonjour_close(connection);
          purple_connection_destroy(connection);
        }
        connection = NULL;
}
[/code]

what has gone wrong with this sequence ?


thanks. 

purple_account_set_enabled() should be used to toggle the checkboxes in the Accounts dialog.


Hi,
thanks for the pointing it out.
now I called the method purple_account_set_enabled() from my main source file of purple plugin protocol.
in order to call this method the header file of the method needed to include.
So I included core.h to call purple_core_get_ui() in order to passe as a method parameter to purple_account_set_enabled().


But when i compile the program i get the following error.

/usr/local/include/libpurple/core.h:62: error: expected specifier-qualifier-list before ‘GHashTable’
/usr/local/include/libpurple/core.h:83: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘purple_core_init’
/usr/local/include/libpurple/core.h:110: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘purple_core_quit_cb’
/usr/local/include/libpurple/core.h:157: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘purple_core_migrate’
/usr/local/include/libpurple/core.h:170: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘purple_core_ensure_single_instance’
/usr/local/include/libpurple/core.h:197: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
make: *** [libsallapa.dll] Error 1

what would be possible cause to this ?
thanks

 



_______________________________________________
Devel mailing list
Devel@...
http://pidgin.im/cgi-bin/mailman/listinfo/devel