Delta Chat Core C-API
Main Page
Classes
Files
File List
File Members
src
mrcontact.h
1
/*******************************************************************************
2
*
3
* Delta Chat Core
4
* Copyright (C) 2017 Björn Petersen
5
* Contact: r10s@b44t.com, http://b44t.com
6
*
7
* This program is free software: you can redistribute it and/or modify it under
8
* the terms of the GNU General Public License as published by the Free Software
9
* Foundation, either version 3 of the License, or (at your option) any later
10
* version.
11
*
12
* This program is distributed in the hope that it will be useful, but WITHOUT
13
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15
* details.
16
*
17
* You should have received a copy of the GNU General Public License along with
18
* this program. If not, see http://www.gnu.org/licenses/ .
19
*
20
******************************************************************************/
21
22
23
#ifndef __MRCONTACT_H__
24
#define __MRCONTACT_H__
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
37
typedef
struct
_mrcontact
mrcontact_t
;
38
39
#define MR_CONTACT_ID_SELF 1
40
#define MR_CONTACT_ID_LAST_SPECIAL 9
41
42
43
mrcontact_t
* mrcontact_new ();
/* the returned pointer is ref'd and must be unref'd after usage */
44
void
mrcontact_empty (
mrcontact_t
*);
45
void
mrcontact_unref
(
mrcontact_t
*);
46
47
uint32_t
mrcontact_get_id
(
mrcontact_t
*);
48
char
*
mrcontact_get_addr
(
mrcontact_t
*);
49
char
*
mrcontact_get_name
(
mrcontact_t
*);
50
char
*
mrcontact_get_display_name
(
mrcontact_t
*);
51
char
*
mrcontact_get_name_n_addr
(
mrcontact_t
*);
52
int
mrcontact_is_blocked
(
mrcontact_t
*);
53
54
55
#ifdef __cplusplus
56
}
/* /extern "C" */
57
#endif
58
#endif
/* __MRCONTACT_H__ */
mrcontact_t::mrcontact_unref
void mrcontact_unref(mrcontact_t *contact)
Free a contact object.
Definition:
mrcontact.c:61
mrcontact_t::mrcontact_get_id
uint32_t mrcontact_get_id(mrcontact_t *contact)
Get the ID of the contact.
Definition:
mrcontact.c:119
mrcontact_t::mrcontact_get_addr
char * mrcontact_get_addr(mrcontact_t *contact)
Get email address.
Definition:
mrcontact.c:137
mrcontact_t::mrcontact_get_name
char * mrcontact_get_name(mrcontact_t *contact)
Get name.
Definition:
mrcontact.c:161
mrcontact_t::mrcontact_get_display_name
char * mrcontact_get_display_name(mrcontact_t *contact)
Get display name.
Definition:
mrcontact.c:184
mrcontact_t::mrcontact_get_name_n_addr
char * mrcontact_get_name_n_addr(mrcontact_t *contact)
Get a summary of name and address.
Definition:
mrcontact.c:215
mrcontact_t::mrcontact_is_blocked
int mrcontact_is_blocked(mrcontact_t *contact)
Check if a contact is blocked.
Definition:
mrcontact.c:240
mrcontact_t
An object representing a single contact in memory.
Generated by
1.8.11