f1a407c79f
FossilOrigin-Name: 6ca19819ff1547744a39e4d248a7803bf6dfd8f20ae64e704f044200746acaf1
16 lines
1.9 KiB
Text
16 lines
1.9 KiB
Text
#ifndef __notification
|
|
#define __notification
|
|
static const char data_notification[] = {0X3C,0X64,0X69,0X76,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X6E,0X6F,0X74,0X69,0X66,0X69,0X63,0X61,0X74,0X69,0X6F,0X6E,0X2D,0X69,0X6E,0X66,0X6F,0X22,0X3E,0XA,0X20,0X20,0X3C,0X69,0X6D,0X67,0X20,0X73,0X72,0X63,0X3D,0X22,0X25,0X73,0X22,0X3E,0XA,0X20,0X20,0X3C,0X64,0X69,0X76,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X6E,0X6F,0X74,0X69,0X66,0X69,0X63,0X61,0X74,0X69,0X6F,0X6E,0X2D,0X75,0X73,0X65,0X72,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X73,0X70,0X61,0X6E,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X6E,0X6F,0X74,0X69,0X66,0X69,0X63,0X61,0X74,0X69,0X6F,0X6E,0X2D,0X74,0X65,0X78,0X74,0X2D,0X67,0X72,0X6F,0X75,0X70,0X2D,0X77,0X69,0X74,0X68,0X2D,0X69,0X63,0X6F,0X6E,0X22,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X73,0X70,0X61,0X6E,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X75,0X73,0X65,0X72,0X6E,0X61,0X6D,0X65,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X73,0X70,0X61,0X6E,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X3C,0X73,0X70,0X61,0X6E,0X20,0X63,0X6C,0X61,0X73,0X73,0X3D,0X22,0X61,0X63,0X74,0X69,0X6F,0X6E,0X22,0X3E,0X25,0X73,0X3C,0X2F,0X73,0X70,0X61,0X6E,0X3E,0XA,0X20,0X20,0X20,0X20,0X20,0X20,0X25,0X73,0X20,0X3C,0X21,0X2D,0X2D,0X20,0X49,0X66,0X20,0X61,0X6E,0X79,0X20,0X2D,0X2D,0X3E,0XA,0X20,0X20,0X20,0X20,0X3C,0X2F,0X73,0X70,0X61,0X6E,0X3E,0XA,0X20,0X20,0X20,0X20,0X25,0X73,0XA,0X20,0X20,0X3C,0X2F,0X64,0X69,0X76,0X3E,0XA,0X3C,0X2F,0X64,0X69,0X76,0X3E,0};
|
|
struct notification_template {const char* avatar;
|
|
const char* username;
|
|
const char* action;
|
|
const char* action_item;
|
|
const char* content;
|
|
};
|
|
char* tmpl_gen_notification(struct notification_template* data, unsigned* size){
|
|
char* ret;
|
|
unsigned s = easprintf(&ret, data_notification, data->avatar?data->avatar:"", data->username?data->username:"", data->action?data->action:"", data->action_item?data->action_item:"", data->content?data->content:"");
|
|
if (size) *size = s;
|
|
return ret;
|
|
}
|
|
#endif
|