Bug 74315 - want to connect and disconnect through dcop interface
Summary: want to connect and disconnect through dcop interface
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: general (show other bugs)
Version: 0.7.3
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-06 05:38 UTC by carl
Modified: 2004-02-07 14:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch the implements the desired feature. (1.12 KB, patch)
2004-02-06 05:38 UTC, carl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description carl 2004-02-06 05:38:01 UTC
Version:           0.7.3 (using KDE 3.1.5)
Installed from:     (testing/unstable)
Compiler:          gcc version 3.3.3 20031229 (prerelease) (Debian)
OS:          Linux (i686) release 2.4.22

I have explored the functions available through the dcop interface.  I want to add two to that.  I have implemented it and will attach a patch.

The two functions are connectAll and disconnectAll.

PS  Sorry about the *-remote wishlist.  I'm not new to KDE but never hacked on it or gone into the guts.  That's my bad.  Hopefully this wishlist will be much better received.

Thanks for all of you work.
Comment 1 carl 2004-02-06 05:38:53 UTC
Created attachment 4533 [details]
Patch the implements the desired feature.
Comment 2 Richard Smith 2004-02-06 09:50:25 UTC
Subject: Re:  New: want to connect and disconnect through dcop interface

On Friday 06 February 2004 4:38 am, carl@ecbaldwin.net wrote:
> I have explored the functions available through the dcop interface.  I want
> to add two to that.  I have implemented it and will attach a patch.
>
> The two functions are connectAll and disconnectAll.

Note that these can be implemented against the existing DCOP interface by 
using accounts() and connect(). I personally wouldn't mind seeing redundancy 
like this in the DCOP interface, but maybe one of the other developers has 
strong feelings about it... if no-one objects, I'll commit this in a couple 
of days.

Unfortunately, I'm not prepared to apply your patch as-is, since the two 
functions you added don't have /** docstrings */. So someone (either you or 
one of us) will have to write some before this can be committed (this is 
mainly a FYI for any future contributions you might like to make - the actual 
code in the patch looks fine).

Comment 3 Martijn Klingens 2004-02-06 11:57:01 UTC
Subject: Re: [Kopete-devel]  want to connect and disconnect through dcop interface

On Friday 06 February 2004 09:50, Richard Smith wrote:
> Note that these can be implemented against the existing DCOP interface by
> using accounts() and connect(). I personally wouldn't mind seeing
> redundancy like this in the DCOP interface, but maybe one of the other
> developers has strong feelings about it...

Looks fine to me. Feel free to commit once the API docs are in place.

Comment 4 carl 2004-02-06 18:30:08 UTC
Subject: Re:  want to connect and disconnect through dcop interface

Thank you for the response.  I have one question.

I have version 0.7.4.  Is accounts() available in that version or is it
something that was added more recently?  I browsed through the interface with
both dcop and didn't come accross it.

Cheers,
Carl Baldwin

Quoting Richard Smith <kde@metafoo.co.uk>:

> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>       
> http://bugs.kde.org/show_bug.cgi?id=74315      
> 
> 
> 
> 
> ------- Additional Comments From kde@metafoo.co.uk  2004-02-06 09:50 -------
> Subject: Re:  New: want to connect and disconnect through dcop interface
> 
> On Friday 06 February 2004 4:38 am, carl@ecbaldwin.net wrote:
> > I have explored the functions available through the dcop interface.  I
> want
> > to add two to that.  I have implemented it and will attach a patch.
> >
> > The two functions are connectAll and disconnectAll.
> 
> Note that these can be implemented against the existing DCOP interface by 
> using accounts() and connect(). I personally wouldn't mind seeing redundancy
> 
> like this in the DCOP interface, but maybe one of the other developers has 
> strong feelings about it... if no-one objects, I'll commit this in a couple 
> of days.
> 
> Unfortunately, I'm not prepared to apply your patch as-is, since the two 
> functions you added don't have /** docstrings */. So someone (either you or 
> one of us) will have to write some before this can be committed (this is 
> mainly a FYI for any future contributions you might like to make - the actual
> 
> code in the patch looks fine).
> 
> 


Comment 5 Richard Smith 2004-02-07 14:21:56 UTC
Subject: kdenetwork/kopete/kopete

CVS commit by lilachaze: 

Allow all accounts to be connected or disconnected at once via DCOP.
Patch by carl@ecbaldwin.net.

CCMAIL: 74315-done@bugs.kde.org


  M +10 -0     kopeteiface.cpp   1.34
  M +10 -0     kopeteiface.h   1.21


--- kdenetwork/kopete/kopete/kopeteiface.cpp  #1.33:1.34
@@ -213,4 +213,14 @@ void KopeteIface::disconnect(const QStri
 }
 
+void KopeteIface::connectAll()
+{
+        KopeteAccountManager::manager()->connectAll();
+}
+
+void KopeteIface::disconnectAll()
+{
+        KopeteAccountManager::manager()->disconnectAll();
+}
+
 bool KopeteIface::loadPlugin( const QString &name )
 {

--- kdenetwork/kopete/kopete/kopeteiface.h  #1.20:1.21
@@ -95,4 +95,14 @@ k_dcop:
 
         /**
+         * Ask all accounts to connect
+         */
+        void connectAll();
+
+        /**
+         * Ask all accounts to disconnect
+         */
+        void disconnectAll();
+
+        /**
          * load a plugin
          * the name is the name of the library: example: kopete_msn