Bitwise notification and visibility types
Allows us to bitwise OR types tgoether, used mainly for exclude GET parameters FossilOrigin-Name: b9a83bef15e39d44c58101ac701d6fe98f915dcd05c9a22bf9420aea3a1fd029
This commit is contained in:
parent
f3dcc8a13a
commit
07e86dfd82
2 changed files with 43 additions and 13 deletions
|
@ -15,19 +15,20 @@
|
|||
|
||||
#ifndef MASTODONT_NOTIF_TYPES
|
||||
#define MASTODONT_NOTIF_TYPES
|
||||
#include <stdint.h>
|
||||
|
||||
enum mstdnt_notification_type
|
||||
{
|
||||
MSTDNT_NOTIFICATION_FOLLOW,
|
||||
MSTDNT_NOTIFICATION_FOLLOW_REQUEST,
|
||||
MSTDNT_NOTIFICATION_MENTION,
|
||||
MSTDNT_NOTIFICATION_REBLOG,
|
||||
MSTDNT_NOTIFICATION_FAVOURITE,
|
||||
MSTDNT_NOTIFICATION_POLL,
|
||||
MSTDNT_NOTIFICATION_STATUS,
|
||||
MSTDNT_NOTIFICATION_EMOJI_REACT,
|
||||
MSTDNT_NOTIFICATION_CHAT_MENTION,
|
||||
MSTDNT_NOTIFICATION_REPORT
|
||||
};
|
||||
/* uint16 */
|
||||
#define MSTDNT_NOTIFICATION_FOLLOW (1<<0)
|
||||
#define MSTDNT_NOTIFICATION_FOLLOW_REQUEST (1<<1)
|
||||
#define MSTDNT_NOTIFICATION_MENTION (1<<2)
|
||||
#define MSTDNT_NOTIFICATION_REBLOG (1<<3)
|
||||
#define MSTDNT_NOTIFICATION_FAVOURITE (1<<4)
|
||||
#define MSTDNT_NOTIFICATION_POLL (1<<5)
|
||||
#define MSTDNT_NOTIFICATION_STATUS (1<<6)
|
||||
#define MSTDNT_NOTIFICATION_EMOJI_REACT (1<<7)
|
||||
#define MSTDNT_NOTIFICATION_CHAT_MENTION (1<<8)
|
||||
#define MSTDNT_NOTIFICATION_REPORT (1<<9)
|
||||
|
||||
typedef mstdnt_notification_t uint16_t;
|
||||
|
||||
#endif /* MASTODONT_NOTIF_TYPES */
|
||||
|
|
29
include/mastodont_visibility_types.h
Normal file
29
include/mastodont_visibility_types.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef MASTODONT_VISIBILITY_TYPES_H
|
||||
#define MASTODONT_VISIBILITY_TYPES_H
|
||||
#include <stdint.h>
|
||||
|
||||
#define MSTDNT_VISIBILITY_PUBLIC (1<<0)
|
||||
#define MSTDNT_VISIBILITY_UNLISTED (1<<1)
|
||||
#define MSTDNT_VISIBILITY_PRIVATE (1<<2)
|
||||
#define MSTDNT_VISIBILITY_DIRECT (1<<3)
|
||||
#define MSTDNT_VISIBILITY_LIST (1<<4)
|
||||
#define MSTDNT_VISIBILITY_LOCAL (1<<5)
|
||||
|
||||
typedef mstdnt_visibility_t uint8_t;
|
||||
|
||||
#endif /* MASTODONT_VISIBILITY_TYPES_H */
|
Loading…
Reference in a new issue