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.
44 lines
744 B
C
44 lines
744 B
C
#pragma once
|
|
|
|
#include <stdio.h>
|
|
#include <time.h>
|
|
#include <stdbool.h>
|
|
|
|
struct status;
|
|
struct notification
|
|
{
|
|
int debug;
|
|
|
|
int id;
|
|
int account_id;
|
|
int status_id;
|
|
struct status* system_status;
|
|
int ref_account_id;
|
|
time_t created_at;
|
|
bool is_muted;
|
|
bool is_seen;
|
|
int type;
|
|
|
|
char* react;
|
|
};
|
|
|
|
enum notification_type
|
|
{
|
|
nt_favorite = 1,
|
|
nt_follow = 2,
|
|
nt_mention = 3,
|
|
nt_unfollow = 4,
|
|
nt_block = 5,
|
|
nt_like = 6,
|
|
nt_react = 7,
|
|
};
|
|
|
|
struct notification* notification_from_id( int id );
|
|
struct notification* notification_new();
|
|
void notification_save( struct notification* note );
|
|
void notification_free( struct notification* note );
|
|
|
|
// TODO: move to controler/view
|
|
//void notification_write_as_json( struct notification* n, FILE* f );
|
|
|