Mercurial > pidgin
diff src/gaim-remote.c @ 5859:022786c7ab53
[gaim-migrate @ 6290]
CUI is gone, long live gaim-remote! The old CUI functionality, which was
for remote-controlling gaim, is now a Core Plugin, so any future UI
(including the current, normal gaim gtk UI) can be remote-controlled.
Applications will soon be able to link against the library and header files
and provide their own remote-control of gaim, but why bother? :) If you
use gaim-remote, make sure to load the new plugin. It won't auto-load.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 14 Jun 2003 06:06:40 +0000 |
parents | 2e78141ec1b5 |
children | 059d95c67cda |
line wrap: on
line diff
--- a/src/gaim-remote.c Fri Jun 13 23:49:26 2003 +0000 +++ b/src/gaim-remote.c Sat Jun 14 06:06:40 2003 +0000 @@ -26,7 +26,8 @@ #include <unistd.h> #include <string.h> #include <locale.h> -#include "gaim-socket.h" + +#include <gaim-remote/remote.h> void show_remote_usage(char *name) { @@ -130,32 +131,32 @@ int command_uri() { int fd = 0; - struct gaim_cui_packet *p = NULL; - fd = gaim_connect_to_session(0); + GaimRemotePacket *p = NULL; + fd = gaim_remote_session_connect(0); if (!fd) { fprintf(stderr, _("Gaim not running (on session 0)\n")); return 1; } - p = cui_packet_new(CUI_TYPE_REMOTE, CUI_REMOTE_URI); - cui_packet_append_string(p, opts.uri); - cui_send_packet (fd, p); + p = gaim_remote_packet_new(CUI_TYPE_REMOTE, CUI_REMOTE_URI); + gaim_remote_packet_append_string(p, opts.uri); + gaim_remote_session_send_packet(fd, p); close(fd); - cui_packet_free(p); + gaim_remote_packet_free(p); return 0; } int command_quit() { int fd = 0; - struct gaim_cui_packet *p = NULL; - fd = gaim_connect_to_session(0); + GaimRemotePacket *p = NULL; + fd = gaim_remote_session_connect(0); if (!fd) { fprintf(stderr, _("Gaim not running (on session 0)\n")); return 1; } - p = cui_packet_new(CUI_TYPE_META, CUI_META_QUIT); - cui_send_packet (fd, p); + p = gaim_remote_packet_new(CUI_TYPE_META, CUI_META_QUIT); + gaim_remote_session_send_packet(fd, p); close(fd); - cui_packet_free(p); + gaim_remote_packet_free(p); return 0; }