HIVE SDK for C++

HIVE_SocialHive.h
Go to the documentation of this file.
1
28#ifndef __HIVE_SOCIALHIVE_H__
29#define __HIVE_SOCIALHIVE_H__
30
31
32#include "HIVE_ResultAPI.h"
33
34
35NS_HIVE_BEGIN
36
37
38class ResultAPI;
39
40
41enum class FriendType;
42enum class HiveDialogType;
43enum class HiveRelationRoute;
44
45class ProfileHive;
46class MessageContent;
47class SocialBadge;
48
49
61class HIVESDK_DLLEXPORT SocialHive
62{
63public:
64
65
78 typedef std::function<void(ResultAPI const & result, std::vector<ProfileHive> const & profileList)> onProfileHive;
79
80
91 typedef std::function<void(ResultAPI const & result)> onSendMessageHive;
92
93
104 typedef std::function<void(ResultAPI const & result)> onShowHiveDialog;
105
106
119 typedef std::function<void(ResultAPI result, SocialBadge socialBadge)> onGetBadgeInfo;
120
121
122
123
134 static void getMyProfile(onProfileHive listener);
135
136
149 static void setMyProfile(std::string displayName, onProfileHive listener);
150
151
166 static void getFriends(FriendType friendType, onProfileHive listener);
167
168
181 static void getProfiles(std::vector<std::string> vidList, onProfileHive listener);
182
183
202 static void sendMessage(MessageContent messageContent, onSendMessageHive listener);
203
204
217 static void sendInvitationMessage(MessageContent messageContent, onSendMessageHive listener);
218
219
252 static void showHiveDialog(HiveDialogType hiveDialogType, std::string vid, onShowHiveDialog listener);
253
289 static void showHiveDialog(HiveDialogType hiveDialogType, std::string vid, std::string additionalInfo, onShowHiveDialog listener);
290
291
305 static void getBadgeInfo(onGetBadgeInfo listener);
306
307
308 // Native 영역에서 호출된 요청을 처리하기 위한 플러그인 내부 코드
309 static void executeEngine(picojson::value jsonParam);
310
311};
312
313
314
315
323enum class FriendType
324{
325 IN_GAME
326 , OUT_GAME
327 , INVITED
328 , ALL_GAME
329
330};
331
332
341{
342 HOME
343 , GAME
344 , USER
345 , INQUIRY
346 , MESSAGE
347 , CHATBOT
348 , MYINQUIRY
349};
350
351
360{
361 DEFAULT,
362 HIVE,
363 FACEBOOK,
364 GAME,
365 CONTACT
366};
367
368
369
370
378class HIVESDK_DLLEXPORT ProfileHive
379{
380public:
381 std::string vid;
382
383 std::string uid;
384
385 std::string identifier;
386
387 std::string userName;
388
389 std::string facebookId;
390
391 std::string googleplusId;
392
393 std::string profileImageUrl;
394
395 std::string country;
396
397 std::string comment;
398
399 bool cached;
400
402
403
404 // 이하 세개 필드는 HIVE 접속 유저의 추가 정보.
405
406 std::string email;
407
408 std::string birthday;
409
410 std::string gender;
411
412
413 // 이하 두개 필드는 HIVE 친구 추가정보.
414
416
417 std::string assnet;
418
420
421
422 ProfileHive();
423
424 ProfileHive(picojson::value jsonParam);
425
426 picojson::object toJson() const;
427
428 std::string toString() const;
429};
430
431
439class HIVESDK_DLLEXPORT MessageContent
440{
441
442public:
443 std::string vid;
444 std::string uid;
445 std::string message;
446 std::string imageUrl;
447 std::string thumbnailUrl;
448 bool usePush;
449
451
452 MessageContent(std::string vid, std::string uid, std::string message, std::string imageUrl, std::string thumbnailUrl, bool usePush);
453
454 MessageContent(picojson::value jsonParam);
455
456 picojson::object toJson() const;
457
458 std::string toString() const;
459};
460
470{
471public:
473
474 SocialBadge();
475
476 SocialBadge(int messgeCount);
477
478 SocialBadge(picojson::value jsonParam);
479
480 picojson::object toJson();
481
482 std::string toString();
483};
484
485
486NS_HIVE_END // namespace hive
487
488
489#endif // __HIVE_SOCIALHIVE_H__
490
491
Message information.
Definition: HIVE_SocialHive.h:440
std::string thumbnailUrl
Thumbnail URL of attached image.
Definition: HIVE_SocialHive.h:447
std::string imageUrl
Attached image URL.
Definition: HIVE_SocialHive.h:446
bool usePush
Whether to send the contents of the note to the device to which the recipient has connected.
Definition: HIVE_SocialHive.h:448
std::string uid
The uid of the recipient of the note.
Definition: HIVE_SocialHive.h:444
std::string message
Message.
Definition: HIVE_SocialHive.h:445
std::string vid
The vid of the person to whom you want to send the note. it is required if uid is null.
Definition: HIVE_SocialHive.h:443
HIVE user profile information
Definition: HIVE_SocialHive.h:379
std::string profileImageUrl
Profile image URL.
Definition: HIVE_SocialHive.h:393
std::string uid
Unique ID (Big Integer type) used in HIVE Social.
Definition: HIVE_SocialHive.h:383
std::string userName
HIVE nickname or facebook name entered by the user (max 128)
Definition: HIVE_SocialHive.h:387
HiveRelationRoute relationRoute
A route that you became friend for the first time.
Definition: HIVE_SocialHive.h:419
std::string vid
The unique ID of the user issued per game when performing a HIVE login The game manages user info...
Definition: HIVE_SocialHive.h:381
bool cached
Whether data is cached (test field)
Definition: HIVE_SocialHive.h:399
bool testAccount
Whether it is a test account, true/false.
Definition: HIVE_SocialHive.h:401
bool gameFriend
Whether in game friend, true/false.
Definition: HIVE_SocialHive.h:415
std::string googleplusId
If you have a Google Sign-in account linked or null if none (Android only.)
Definition: HIVE_SocialHive.h:391
std::string facebookId
Facebook Id if Facebook account is connected, null if not.
Definition: HIVE_SocialHive.h:389
std::string comment
The user's status message (a "word" entered by the user)
Definition: HIVE_SocialHive.h:397
std::string email
Login email address. Null if none.
Definition: HIVE_SocialHive.h:406
std::string identifier
HIVE Login ID (max 12)
Definition: HIVE_SocialHive.h:385
std::string gender
Gender , Null if none.
Definition: HIVE_SocialHive.h:410
std::string assnet
HIVE Membership, C: Com2us, G : GameVil, H : HIVE, or null.
Definition: HIVE_SocialHive.h:417
std::string country
Country code according to user selection.
Definition: HIVE_SocialHive.h:395
std::string birthday
Birthday , Null if none.
Definition: HIVE_SocialHive.h:408
Definition: HIVE_ResultAPI.h:63
HIVE Social Badge information.
Definition: HIVE_SocialHive.h:470
int messageCount
The number of message.
Definition: HIVE_SocialHive.h:472
HIVE users can view and modify their profile information and provide a social game service where they...
Definition: HIVE_SocialHive.h:62
HiveDialogType
Types of HIVE Social WebView Dialog.
Definition: HIVE_SocialHive.h:341
static void getProfiles(std::vector< std::string > vidList, onProfileHive listener)
HIVE 사용자 정보를 조회한다.
static void getFriends(FriendType friendType, onProfileHive listener)
Request HIVE Profile / Friend Information In the form of friends, there are friends who play games to...
std::function< void(ResultAPI const &result)> onShowHiveDialog
Returns showing HIVE Social dialog result.
Definition: HIVE_SocialHive.h:104
static void sendMessage(MessageContent messageContent, onSendMessageHive listener)
Send message to HIVE friend If you send a message to a HIVE friend, a push notification will be sen...
std::function< void(ResultAPI const &result)> onSendMessageHive
Returns HIVE message transmission result.
Definition: HIVE_SocialHive.h:91
FriendType
Types of Friend list.
Definition: HIVE_SocialHive.h:324
std::function< void(ResultAPI result, SocialBadge socialBadge)> onGetBadgeInfo
HIVE Social Badge information.
Definition: HIVE_SocialHive.h:119
static void showHiveDialog(HiveDialogType hiveDialogType, std::string vid, std::string additionalInfo, onShowHiveDialog listener)
Show HIVE WebView dialog (- HIVE Social's default first screen (feed){@inheritDoc HiveDialogType::HO...
std::function< void(ResultAPI const &result, std::vector< ProfileHive > const &profileList)> onProfileHive
Returns HIVE Profile / Friend Information.
Definition: HIVE_SocialHive.h:78
static void showHiveDialog(HiveDialogType hiveDialogType, std::string vid, onShowHiveDialog listener)
Show HIVE WebView dialog (- HIVE Social's default first screen (feed){@inheritDoc HiveDialogType::HO...
static void getMyProfile(onProfileHive listener)
Request profile information of HIVE certified users.
static void setMyProfile(std::string displayName, onProfileHive listener)
Set profile information of HIVE certified users.
static void sendInvitationMessage(MessageContent messageContent, onSendMessageHive listener)
Send a invite message to HIVE user.
HiveRelationRoute
HIVE The path form of friendship.
Definition: HIVE_SocialHive.h:360
static void getBadgeInfo(onGetBadgeInfo listener)
Request HIVE Social Badge info.
@ CHATBOT
HIVE Chatbot 1:1 Inquiry.
@ USER
HIVE Social user profile.
@ GAME
HIVE Social game list.
@ HOME
HIVE Social home.
@ MESSAGE
HIVE Note. Only for HIVE user.
@ INQUIRY
HIVE 1:1 Inquiry.
@ MYINQUIRY
HIVE My Inquiry.
@ IN_GAME
If you are playing a game and they are friends on HIVE.
@ INVITED
Friends invited by HIVE Social.
@ OUT_GAME
If you are not playing games, but they are friends on HIVE.
@ ALL_GAME
All friends on HIVE.
@ FACEBOOK
Through Facebook.
@ HIVE
Through HIVE Social.
@ CONTACT
Through Contacts.
Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy