SnsSrvFb.h
3.51 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#ifndef __SNS_SRV_FB_H__
#define __SNS_SRV_FB_H__
typedef struct srv_sns_fb_activity {
struct srv_sns_fb_activity *next;
srv_sns_user_struct user;
srv_sns_activity_enum type;
U8 act_id_len; CHAR *act_id;
U8 photo_id_len; CHAR *photo_id;
U16 message_len; WCHAR *message;
U16 link_len; CHAR *link;
U8 has_pic;
U16 pic_len; WCHAR *pic; /* local path of pic, empty if not yet downloaded */
U32 timestamp;
U32 blob_size; /* 12 */
// ----------
S16 photo_index; /* -1 if no photo */
U16 like_count;
U8 can_like;
U8 user_likes;
U16 comment_count;
U8 can_comment;
} srv_sns_fb_activity_struct;
typedef struct srv_sns_fb_photo {
struct srv_sns_fb_photo *next;
U32 provider;
U8 album_id_len; CHAR *album_id;
U8 user_id_len; CHAR *user_id;
U8 photo_id_len; CHAR *photo_id;
U16 description_len; WCHAR *description;
U8 has_pic;
U8 thumbnail_len; WCHAR *thumbnail; /* local path of thumbnail, empty if not yet downloaded */
U8 pic_len; WCHAR *pic; /* url of the pic */
U16 count; /* number of photos in the same album */
U16 pos; /* the position of this photo in the album */
U32 blob_size; /* 8 */
// ----------
U16 like_count;
U8 can_like;
U8 user_likes;
U16 comment_count;
U8 can_comment;
} srv_sns_fb_photo_struct;
/******************************************************************************
* FUNCTION
* srv_sns_fb_like
* DESCRIPTION
* like or unlike an object
* PARAMETERS
* activity: [IN] the activity to like
* like_count and user_likes should be updated if successful
* like: [IN] true to like, false to unlike
* cb: [IN] callback will be called to receive the requested data
* RETURNS
* > 0 for request id
* < 0 for srv_sns_result
******************************************************************************/
S32 srv_sns_fb_like(
srv_sns_object_enum type,
CHAR *obj_id,
MMI_BOOL like,
mmi_proc_func done_cb, // EVT_ID_SRV_SNS_RESULT
void *user_data
);
/******************************************************************************
* FUNCTION
* srv_sns_fb_like_with_update
* DESCRIPTION
* like or unlike an object
* PARAMETERS
* list_id: [IN] the list
* index: [IN] the index
* like: [IN] true to like, false to unlike
* cb: [IN] callback will be called to receive the requested data
* RETURNS
* > 0 for request id
* < 0 for srv_sns_result
******************************************************************************/
S32 srv_sns_fb_like_with_update(
S32 list_id,
S16 index,
MMI_BOOL like,
mmi_proc_func done_cb, // EVT_ID_SRV_SNS_RESULT
void *user_data
);;
/******************************************************************************
* FUNCTION
* srv_sns_fb_write_wall
* DESCRIPTION
* write on a friend's wall
* PARAMETERS
* user_id: [IN] the id of the friend whose wall to write on
* message: [IN] the message to write on his/her wall
* cb: [IN] callback will be called to receive the requested data
* RETURNS
* > 0 for request id
* < 0 for srv_sns_result
******************************************************************************/
S32 srv_sns_fb_write_wall(
CHAR *user_id,
WCHAR *message
);
#endif