*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301 USA
*
* Authors: Guillaume Desmottes <gdesmott@gnome.org>
*/
-#include <config.h>
-#include <string.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <glib/gi18n-lib.h>
-
-#include <telepathy-glib/util.h>
-
-#include "empathy-marshal.h"
+#include "config.h"
#include "empathy-irc-network.h"
+
#include "empathy-utils.h"
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyIrcNetwork)
* EmpathyIrcNetwork::modified:
* @network: the object that received the signal
*
- * Emitted when either a property or a server of the network is modified.
+ * Emitted when either a property or a server of the network is modified or
+ * when a network is activated.
*
*/
signals[MODIFIED] = g_signal_new (
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
}
+/**
+ * empathy_irc_network_activate:
+ * @self: the name of the network
+ *
+ * Activates a #EmpathyIrcNetwork.
+ *
+ */
+void
+empathy_irc_network_activate (EmpathyIrcNetwork *self)
+{
+ g_return_if_fail (EMPATHY_IS_IRC_NETWORK (self));
+ g_return_if_fail (self->dropped);
+
+ self->dropped = FALSE;
+
+ g_signal_emit (self, signals[MODIFIED], 0);
+}
+
/**
* empathy_irc_network_new:
* @name: the name of the network
g_signal_emit (self, signals[MODIFIED], 0);
}
+
+const gchar *
+empathy_irc_network_get_name (EmpathyIrcNetwork *self)
+{
+ EmpathyIrcNetworkPriv *priv = GET_PRIV (self);
+
+ return priv->name;
+}
+
+const gchar *
+empathy_irc_network_get_charset (EmpathyIrcNetwork *self)
+{
+ EmpathyIrcNetworkPriv *priv = GET_PRIV (self);
+
+ return priv->charset;
+}