forked from juddmon/jpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jp-contact.c
76 lines (64 loc) · 2.42 KB
/
jp-contact.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*******************************************************************************
* contact.c: Translate Palm contact data formats
* A module of J-Pilot http://jpilot.org
*
* Copyright (C) 2003-2014 by Judd Montgomery
*
* This code is NOT derived from contact.c from pilot-link
* pilot-link's contact.c was based on this code.
* This code was however based on address.c and was originally written to
* be part of pilot-link, however licensing issues
* prevent this code from being part of pilot-link.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
******************************************************************************/
/********************************* Includes ***********************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pi-macros.h"
#include "jp-pi-contact.h"
#include "config.h"
#include <pi-contact.h>
/****************************** Main Code *************************************/
void jp_free_Contact(struct Contact *c)
{
free_Contact(c);
}
int jp_unpack_Contact(struct Contact *c, pi_buffer_t *buf)
{
// Pilot-link doesn't do anything with the contactsType parameter yet
return unpack_Contact(c, buf, contacts_v10);
}
int jp_pack_Contact(struct Contact *c, pi_buffer_t *buf)
{
// Pilot-link doesn't do anything with the contactsType parameter yet
return pack_Contact(c, buf, contacts_v10);
}
int jp_Contact_add_blob(struct Contact *c, struct ContactBlob *blob)
{
return Contact_add_blob(c, blob);
}
int jp_Contact_add_picture(struct Contact *c, struct ContactPicture *p)
{
return Contact_add_picture(c, p);
}
int jp_unpack_ContactAppInfo(struct ContactAppInfo *ai, pi_buffer_t *buf)
{
return unpack_ContactAppInfo(ai, buf);
}
int jp_pack_ContactAppInfo(struct ContactAppInfo *ai, pi_buffer_t *buf)
{
return pack_ContactAppInfo(ai, buf);
}