respect https prefix
[k8lowj.git] / src / liblj / editpostevent.c
blob58da2f201dd487bf010619b16fe9facfa85c8754
1 /* liblivejournal - a client library for LiveJournal.
2 * Copyright (C) 2003 Evan Martin <evan@livejournal.com>
3 */
5 #include <glib.h>
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);
24 return editpostevent;
28 void lj_editpostevent_free (LJEditPostEvent *editpostevent) {
29 /*if (editpostevent->friends) {
30 if (includefriends)
31 g_hash_table_foreach(editpostevent->friends,
32 (GHFunc)hash_friend_free_cb, NULL);
33 g_hash_table_destroy(editpostevent->friends);
34 }*/
35 g_free(editpostevent);