HIVE SDK for C++

HIVE_PlatformHelper.h
1
11#ifndef HIVE_PlatformHelper_hpp
12#define HIVE_PlatformHelper_hpp
13
14#include <stdio.h>
15
16NS_HIVE_BEGIN
17
18enum class PlatformShareType;
19enum class PlatformShareDataType;
20class PlatformShare;
21
26class HIVESDK_DLLEXPORT PlatformHelper
27{
28public:
29
37 typedef std::function<void(bool isSuccess)> onHIVEPlatformHelperShareHandler;
38
44 static void share(PlatformShare platformShare, onHIVEPlatformHelperShareHandler handler);
45
53 typedef std::function<void(ResultAPI const & result, std::vector<std::string> const & granted, std::vector<std::string> const & denied)> onRequestUserPermissionsHandler;
54
62 static void requestUserPermissions(std::vector<std::string> requests, onRequestUserPermissionsHandler handler);
63
64 // Native 영역에서 호출된 요청을 처리하기 위한 플러그인 내부 코드
65 static void executeEngine(picojson::value jsonParam);
66};
67
76{
77 TEXT = 1
78 , MEDIA = 2
79};
80
89{
90 SUBJECT = 0,
91 TEXT,
92 MEDIA,
93};
94
95class HIVESDK_DLLEXPORT PlatformShare
96{
97public:
98 PlatformShare();
99 ~PlatformShare();
100
101 PlatformShareType getShareType();
102 int getShareTypeInt();
103 void setShareType(PlatformShareType shareType);
104
105 std::string getSubject();
106 void setSubject(std::string subject);
107
108 std::string getText();
109 void setText(std::string text);
110
111 std::vector<std::string> getMedia();
112 void setMedia(std::vector<std::string> paths);
113
114private:
115 PlatformShareType shareType;
116
117 std::string subject;
118 std::string text;
119 std::vector<std::string> paths;
120};
121
122NS_HIVE_END
123
124
125
126#endif /* HIVE_PlatformHelper_hpp */
127
128
플랫폼에서 지원하는 기능을 제공하는 클래스이다.
Definition: HIVE_PlatformHelper.h:27
static void share(PlatformShare platformShare, onHIVEPlatformHelperShareHandler handler)
하나 또는 복수 개의 미디어(이미지, 오디오, 비디오) 또는 텍스트를 공유한다.
Definition: HIVE_ResultAPI.h:63
std::function< void(ResultAPI const &result, std::vector< std::string > const &granted, std::vector< std::string > const &denied)> onRequestUserPermissionsHandler
Android에서 재요청된 OS 권한동의에 대한 결과 값을 반환한다.
Definition: HIVE_PlatformHelper.h:53
std::function< void(bool isSuccess)> onHIVEPlatformHelperShareHandler
Share 관련 동작이 완료되었을 때 호출됨.
Definition: HIVE_PlatformHelper.h:37
PlatformShareDataType
공유 데이터 타입
Definition: HIVE_PlatformHelper.h:89
static void requestUserPermissions(std::vector< std::string > requests, onRequestUserPermissionsHandler handler)
Android에서 사용자에게 OS 권한을 재요청.
PlatformShareType
공유 타입
Definition: HIVE_PlatformHelper.h:76
@ MEDIA
미디어
Copyright © Com2uS Platform Corporation. All Right Reserved. 이용약관 개인정보 처리방침