mirror of
https://github.com/danog/Telegram.git
synced 2024-12-04 02:17:51 +01:00
18 lines
589 B
Objective-C
18 lines
589 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
typedef struct {
|
|
int32_t namespaceId;
|
|
int32_t peerId;
|
|
} TGPeerId;
|
|
|
|
typedef enum {
|
|
TGPeerIdPrivate = 0,
|
|
TGPeerIdGroup = 1,
|
|
TGPeerIdChannel = 2
|
|
} TGPeerIdNamespace;
|
|
|
|
#define TGPeerIdPrivateMake(x) ((TGPeerId){.namespaceId = TGPeerIdPrivate, .peerId = (x)})
|
|
#define TGPeerIdGroupMake(x) ((TGPeerId){.namespaceId = TGPeerIdGroup, .peerId = (x)})
|
|
#define TGPeerIdChannelMake(x) ((TGPeerId){.namespaceId = TGPeerIdChannel, .peerId = (x)})
|
|
#define TGPeerIdEqualToPeerId(x, y) ((x).namespaceId == (y).namespaceId && (x).peerId == (y).peerId)
|