1 /* liblivejournal - a client library for LiveJournal.
2 * Copyright (C) 2003 Evan Martin <evan@livejournal.com>
6 #include <stdlib.h> /* atoi */
8 #include "liblj/editpostevent.h"
11 static void parse_result (LJVerb
*verb
) {
12 /* XXX get itemid and anum, if we need it. */
16 LJEditPostEvent
*lj_editpostevent_new (LJUser
*user
, const char *usejournal
, gboolean edit
, LJEntry
*entry
) {
17 LJEditPostEvent
*editpostevent
= g_new0(LJEditPostEvent
, 1);
18 LJVerb
*verb
= (LJVerb
*)editpostevent
;
20 lj_verb_init(verb
, user
, edit
?"editevent":"postevent", FALSE
, parse_result
);
21 if (usejournal
) lj_request_add(verb
->request
, "usejournal", usejournal
);
22 lj_entry_set_request_fields(entry
, verb
->request
);
28 void lj_editpostevent_free (LJEditPostEvent
*editpostevent
) {
29 /*if (editpostevent->friends) {
31 g_hash_table_foreach(editpostevent->friends,
32 (GHFunc)hash_friend_free_cb, NULL);
33 g_hash_table_destroy(editpostevent->friends);
35 g_free(editpostevent
);