| liblivejournal Reference Manual |
|---|
struct LJServer; struct LJUser; enum LJAuthScheme; LJServer* lj_server_new (const char *url); int lj_server_get_last_cached_moodid (LJServer *server); #define lj_server_unicode (s) LJUser* lj_user_new (LJServer *server); gint lj_user_compare (gconstpointer a, gconstpointer b); #define lj_mood_new () #define lj_mood_id_from_name (server, name) #define lj_mood_name_from_id (server, id) #define lj_mood_compare #define lj_friendgroup_new () #define lj_friendgroup_from_id (user, id) #define lj_friend_group_free typedef LJWebMenuItem; #define lj_webmenuitem_new () void lj_webmenu_free (GSList *menu);
struct LJServer {
char *url;
GSList *moods;
int protocolversion;
LJAuthScheme authscheme;
};A LiveJournal server.
char *url | url to the LiveJournal installation on the server. |
GSList *moods | a list of LJMood. |
int protocolversion | protocol version to use on the server. |
LJAuthScheme authscheme |
struct LJUser {
LJServer *server;
char *username;
char *password;
char *fullname;
gboolean checkfriends;
GSList *pickws;
GSList *friendgroups;
GSList *usejournals;
GSList *webmenu;
};A LiveJournal user. Fields other than server, username, and password are provided by the server in the login mode.
LJServer *server | the LJServer this user is on. |
char *username | the username. |
char *password | the password. |
char *fullname | the full name for this user. |
gboolean checkfriends | |
GSList *pickws | a list of strings comprising the picture keywords for this user. |
GSList *friendgroups | a list of LJFriendGroup. |
GSList *usejournals | a list of journal usernames this user can post in. |
GSList *webmenu | a list of LJWebMenuItem. |
typedef enum {
LJ_AUTH_SCHEME_UNKNOWN,
LJ_AUTH_SCHEME_NONE, /* we use md5 passwords by default.
they're replayable, but at least you're not sending
in plaintext. */
LJ_AUTH_SCHEME_C0, /* challenge/response.
http://www.livejournal.com/~lj_dev/599743.html. */
LJ_AUTH_SCHEME_OTHER /* for authschemes we don't know about yet. */
} LJAuthScheme;LJServer* lj_server_new (const char *url);
Create a new LJServer.
| url : | url to the LiveJournal installation on the server. |
| Returns : | a new LJServer. |
int lj_server_get_last_cached_moodid
(LJServer *server);Get the last moodid in the mood list of server. Used in the login mode to only retrieve new moodids.
| server : | an LJServer. |
| Returns : | integer moodid. |
#define lj_mood_id_from_name(server, name) _lj_nid_by_name(server->moods, name)
| server : | |
| name : |
|
#define lj_mood_name_from_id(server, id) _lj_nid_by_id(server->moods, id)
| server : | |
| id : |
|
#define lj_friendgroup_from_id(user, id) _lj_nid_by_id(user->friendgroups, id)
| user : | |
| id : |
|
| <<< entry | types >>> |