mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:15:11 +00:00
[MOD] Add width/height information when possible
This commit is contained in:
parent
09d38993bb
commit
d989331716
5 changed files with 103 additions and 3 deletions
23
src/include/FileInfo.h
Normal file
23
src/include/FileInfo.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef PARSEE_FILEINFO_H
|
||||
#define PARSEE_FILEINFO_H
|
||||
|
||||
#include "XML.h"
|
||||
|
||||
typedef struct FileInfo {
|
||||
int width;
|
||||
int height;
|
||||
int size;
|
||||
} FileInfo;
|
||||
|
||||
/** Grab file metadata through SIMS.
|
||||
* ----------------
|
||||
* Returns: File information(SIMS)[HEAP]
|
||||
* Thrasher: FileInfoFree */
|
||||
extern FileInfo * FileInfoFromXMPP(XMLElement *stanza);
|
||||
|
||||
/** Frees all information related with file metadata.
|
||||
* --------------
|
||||
* Thrashes: info */
|
||||
extern void FileInfoFree(FileInfo *info);
|
||||
|
||||
#endif
|
||||
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <Cytoplasm/Json.h>
|
||||
|
||||
#include "FileInfo.h"
|
||||
|
||||
/* A simple representation of everything. It is not as complex as
|
||||
* Telodendria's CommonID parser, simply because Parsee does not
|
||||
* need such complexity. */
|
||||
|
|
@ -33,7 +35,7 @@ extern HashMap * MatrixCreateReact(char *event, char *body);
|
|||
extern HashMap * MatrixCreateReplace(char *event, char *body);
|
||||
|
||||
/* Creates the content for a media file. */
|
||||
extern HashMap * MatrixCreateMedia(char *mxc, char *body, char *mime);
|
||||
extern HashMap * MatrixCreateMedia(char *mxc, char *body, char *mime, FileInfo *info);
|
||||
|
||||
/* Creates the content for a m.room.name state event */
|
||||
extern HashMap * MatrixCreateNameState(char *name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue