view mcabber/src/buddies.h @ 35:a8ceaa3005fd

[/trunk] Changeset 51 by mikael Work on libjabber integration. This is a big patch... * Remove socket.[ch] server.[ch] We have now fully switched to libjabber. * Roster is fetched, and buddies are added to the buddylist * Can send/receive messages using libjabber * Presence messages are handled. I have added statuses, as there only were online / offline statuses. * Use halfdelay to have a non-blocking getch(). And use a timeout in jb_main(). * Use utf8_{encode,decode}
author mikael
date Mon, 04 Apr 2005 19:13:58 +0000
parents e88b15cbf2de
children 85bbc6ed3796
line wrap: on
line source

#ifndef __BUDDIES_H__
#define __BUDDIES_H__ 1

#include <ncurses.h>
#include "jabglue.h"
#include "list.h"

/* Definici´┐Żn de tipos */
typedef struct _buddy_entry_t {
  char *jid;
  char *name;
  char *group;
  char *resource;
  int flags;
  struct list_head list;
} buddy_entry_t;

void bud_DrawRoster(WINDOW * win);
void bud_RosterDown(void);
void bud_RosterUp(void);
void bud_TerminateBuddies(void);
int  bud_BuddyCount(void);
void bud_SetBuddyStatus(char *jidfrom, enum imstatus status);
buddy_entry_t *bud_SelectedInfo(void);

buddy_entry_t *bud_AddBuddy(const char *bjid, const char *bname);
void           bud_DeleteBuddy(buddy_entry_t *buddy);