You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
585 B
C
41 lines
585 B
C
#pragma once
|
|
|
|
#include "json/layout.h"
|
|
#include <stdbool.h>
|
|
#include <time.h>
|
|
|
|
struct emoji;
|
|
|
|
struct status_poll_option
|
|
{
|
|
char* title;
|
|
|
|
struct {
|
|
int* items;
|
|
int count;
|
|
} votes;
|
|
};
|
|
|
|
struct status_poll
|
|
{
|
|
int id;
|
|
time_t expires_at;
|
|
bool multiple_choice;
|
|
int votes_count;
|
|
bool voted;
|
|
struct {
|
|
struct status_poll_option** items;
|
|
int count;
|
|
} options;
|
|
|
|
struct {
|
|
struct emoji** items;
|
|
int count;
|
|
} emoji;
|
|
};
|
|
|
|
extern struct json_field_type status_poll_type;
|
|
void status_poll_option_free( struct status_poll_option* o );
|
|
void status_poll_free( struct status_poll* p );
|
|
|