Skip to content

Commit 1a301e7

Browse files
committed
Mobile SDK Support
1 parent 3362ced commit 1a301e7

File tree

604 files changed

+114593
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

604 files changed

+114593
-0
lines changed
38.8 MB
Binary file not shown.
10.6 MB
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright Epic Games, Inc. All Rights Reserved.
2+
3+
#pragma once
4+
5+
/********************************************************************
6+
* Provided to allow EOS_BUILD_PLATFORM_NAME to be defined even for
7+
* platforms that do not require it when using eos_platform_prereqs.h
8+
********************************************************************/
Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
// Copyright Epic Games, Inc. All Rights Reserved.
2+
#pragma once
3+
4+
#include "eos_achievements_types.h"
5+
6+
/**
7+
* The following EOS_Achievements_* functions allow you to query existing achievement definitions that have been defined for your application.
8+
* You can also query achievement progress data for users.
9+
* In addition, you can also unlock one or more achievements directly.
10+
* You can also receive notifications when achievements are unlocked.
11+
*/
12+
13+
/**
14+
* Query for a list of definitions for all existing achievements, including localized text, icon IDs and whether an achievement is hidden.
15+
*
16+
* @note When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see EOS_PF_DISABLE_SOCIAL_OVERLAY).
17+
*
18+
* @param Options Structure containing information about the application whose achievement definitions we're retrieving.
19+
* @param ClientData Arbitrary data that is passed back to you in the CompletionDelegate
20+
* @param CompletionDelegate This function is called when the query definitions operation completes.
21+
*
22+
* @return EOS_Success if the operation completes successfully
23+
* EOS_InvalidParameters if any of the options are incorrect
24+
*/
25+
EOS_DECLARE_FUNC(void) EOS_Achievements_QueryDefinitions(EOS_HAchievements Handle, const EOS_Achievements_QueryDefinitionsOptions* Options, void* ClientData, const EOS_Achievements_OnQueryDefinitionsCompleteCallback CompletionDelegate);
26+
27+
/**
28+
* Fetch the number of achievement definitions that are cached locally.
29+
*
30+
* @param Options The Options associated with retrieving the achievement definition count
31+
*
32+
* @see EOS_Achievements_CopyAchievementDefinitionByIndex
33+
*
34+
* @return Number of achievement definitions or 0 if there is an error
35+
*/
36+
EOS_DECLARE_FUNC(uint32_t) EOS_Achievements_GetAchievementDefinitionCount(EOS_HAchievements Handle, const EOS_Achievements_GetAchievementDefinitionCountOptions* Options);
37+
38+
/**
39+
* Fetches an achievement definition from a given index.
40+
*
41+
* @param Options Structure containing the index being accessed
42+
* @param OutDefinition The achievement definition for the given index, if it exists and is valid, use EOS_Achievements_Definition_Release when finished
43+
*
44+
* @see EOS_Achievements_DefinitionV2_Release
45+
*
46+
* @return EOS_Success if the information is available and passed out in OutDefinition
47+
* EOS_InvalidParameters if you pass a null pointer for the out parameter
48+
* EOS_NotFound if the achievement definition is not found
49+
* EOS_Invalid_ProductUserID if any of the userid options are incorrect
50+
*/
51+
EOS_DECLARE_FUNC(EOS_EResult) EOS_Achievements_CopyAchievementDefinitionV2ByIndex(EOS_HAchievements Handle, const EOS_Achievements_CopyAchievementDefinitionV2ByIndexOptions* Options, EOS_Achievements_DefinitionV2 ** OutDefinition);
52+
53+
/**
54+
* Fetches an achievement definition from a given achievement ID.
55+
*
56+
* @param Options Structure containing the achievement ID being accessed
57+
* @param OutDefinition The achievement definition for the given achievement ID, if it exists and is valid, use EOS_Achievements_Definition_Release when finished
58+
*
59+
* @see EOS_Achievements_DefinitionV2_Release
60+
*
61+
* @return EOS_Success if the information is available and passed out in OutDefinition
62+
* EOS_InvalidParameters if you pass a null pointer for the out parameter
63+
* EOS_NotFound if the achievement definition is not found
64+
* EOS_Invalid_ProductUserID if any of the userid options are incorrect
65+
*/
66+
EOS_DECLARE_FUNC(EOS_EResult) EOS_Achievements_CopyAchievementDefinitionV2ByAchievementId(EOS_HAchievements Handle, const EOS_Achievements_CopyAchievementDefinitionV2ByAchievementIdOptions* Options, EOS_Achievements_DefinitionV2 ** OutDefinition);
67+
68+
/**
69+
* Query for a list of achievements for a specific player, including progress towards completion for each achievement.
70+
* Note: By default, this query will not return locked hidden achievements. To return all achievements, call EOS_Achievements_QueryDefinitions first.
71+
*
72+
* @note When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see EOS_PF_DISABLE_SOCIAL_OVERLAY).
73+
*
74+
* @param Options Structure containing information about the player whose achievements we're retrieving.
75+
* @param ClientData Arbitrary data that is passed back to you in the CompletionDelegate
76+
* @param CompletionDelegate This function is called when the query player achievements operation completes.
77+
*
78+
* @return EOS_Success if the operation completes successfully
79+
* EOS_Invalid_ProductUserID if any of the userid options are incorrect
80+
* EOS_InvalidParameters if any of the other options are incorrect
81+
*/
82+
EOS_DECLARE_FUNC(void) EOS_Achievements_QueryPlayerAchievements(EOS_HAchievements Handle, const EOS_Achievements_QueryPlayerAchievementsOptions* Options, void* ClientData, const EOS_Achievements_OnQueryPlayerAchievementsCompleteCallback CompletionDelegate);
83+
84+
/**
85+
* Fetch the number of player achievements that are cached locally.
86+
*
87+
* @param Options The Options associated with retrieving the player achievement count
88+
*
89+
* @see EOS_Achievements_CopyPlayerAchievementByIndex
90+
*
91+
* @return Number of player achievements or 0 if there is an error
92+
*/
93+
EOS_DECLARE_FUNC(uint32_t) EOS_Achievements_GetPlayerAchievementCount(EOS_HAchievements Handle, const EOS_Achievements_GetPlayerAchievementCountOptions* Options);
94+
95+
/**
96+
* Fetches a player achievement from a given index.
97+
*
98+
* @param Options Structure containing the Product User ID and index being accessed
99+
* @param OutAchievement The player achievement data for the given index, if it exists and is valid, use EOS_Achievements_PlayerAchievement_Release when finished
100+
*
101+
* @see EOS_Achievements_PlayerAchievement_Release
102+
*
103+
* @return EOS_Success if the information is available and passed out in OutAchievement
104+
* EOS_InvalidParameters if you pass a null pointer for the out parameter
105+
* EOS_NotFound if the player achievement is not found
106+
* EOS_Invalid_ProductUserID if you pass an invalid user ID
107+
*/
108+
EOS_DECLARE_FUNC(EOS_EResult) EOS_Achievements_CopyPlayerAchievementByIndex(EOS_HAchievements Handle, const EOS_Achievements_CopyPlayerAchievementByIndexOptions* Options, EOS_Achievements_PlayerAchievement ** OutAchievement);
109+
110+
/**
111+
* Fetches a player achievement from a given achievement ID.
112+
*
113+
* @param Options Structure containing the Product User ID and achievement ID being accessed
114+
* @param OutAchievement The player achievement data for the given achievement ID, if it exists and is valid, use EOS_Achievements_PlayerAchievement_Release when finished
115+
*
116+
* @see EOS_Achievements_PlayerAchievement_Release
117+
*
118+
* @return EOS_Success if the information is available and passed out in OutAchievement
119+
* EOS_InvalidParameters if you pass a null pointer for the out parameter
120+
* EOS_NotFound if the player achievement is not found
121+
* EOS_Invalid_ProductUserID if you pass an invalid user ID
122+
*/
123+
EOS_DECLARE_FUNC(EOS_EResult) EOS_Achievements_CopyPlayerAchievementByAchievementId(EOS_HAchievements Handle, const EOS_Achievements_CopyPlayerAchievementByAchievementIdOptions* Options, EOS_Achievements_PlayerAchievement ** OutAchievement);
124+
125+
/**
126+
* Unlocks a number of achievements for a specific player.
127+
*
128+
* @param Options Structure containing information about the achievements and the player whose achievements we're unlocking.
129+
* @param ClientData Arbitrary data that is passed back to you in the CompletionDelegate
130+
* @param CompletionDelegate This function is called when the unlock achievements operation completes.
131+
*
132+
* @return EOS_Success if the operation completes successfully
133+
* EOS_InvalidParameters if any of the options are incorrect
134+
*/
135+
EOS_DECLARE_FUNC(void) EOS_Achievements_UnlockAchievements(EOS_HAchievements Handle, const EOS_Achievements_UnlockAchievementsOptions* Options, void* ClientData, const EOS_Achievements_OnUnlockAchievementsCompleteCallback CompletionDelegate);
136+
137+
/**
138+
* Register to receive achievement unlocked notifications.
139+
* @note If the returned NotificationId is valid, you must call EOS_Achievements_RemoveNotifyAchievementsUnlocked when you no longer wish to have your NotificationHandler called.
140+
*
141+
* @see EOS_Achievements_RemoveNotifyAchievementsUnlocked
142+
*
143+
* @param Options Structure containing information about the achievement unlocked notification
144+
* @param ClientData Arbitrary data that is passed back to you in the CompletionDelegate
145+
* @param NotificationFn A callback that is fired when an achievement unlocked notification for a user has been received
146+
*
147+
* @return handle representing the registered callback
148+
*/
149+
EOS_DECLARE_FUNC(EOS_NotificationId) EOS_Achievements_AddNotifyAchievementsUnlockedV2(EOS_HAchievements Handle, const EOS_Achievements_AddNotifyAchievementsUnlockedV2Options* Options, void* ClientData, const EOS_Achievements_OnAchievementsUnlockedCallbackV2 NotificationFn);
150+
151+
/**
152+
* Unregister from receiving achievement unlocked notifications.
153+
*
154+
* @see EOS_Achievements_AddNotifyAchievementsUnlocked
155+
*
156+
* @param InId Handle representing the registered callback
157+
*/
158+
EOS_DECLARE_FUNC(void) EOS_Achievements_RemoveNotifyAchievementsUnlocked(EOS_HAchievements Handle, EOS_NotificationId InId);
159+
160+
/**
161+
* DEPRECATED! Use EOS_Achievements_CopyAchievementDefinitionV2ByIndex instead.
162+
*
163+
* Fetches an achievement definition from a given index.
164+
*
165+
* @param Options Structure containing the index being accessed
166+
* @param OutDefinition The achievement definition for the given index, if it exists and is valid, use EOS_Achievements_Definition_Release when finished
167+
*
168+
* @see EOS_Achievements_CopyAchievementDefinitionV2ByIndex
169+
* @see EOS_Achievements_Definition_Release
170+
*
171+
* @return EOS_Success if the information is available and passed out in OutDefinition
172+
* EOS_InvalidParameters if you pass a null pointer for the out parameter
173+
* EOS_NotFound if the achievement definition is not found
174+
*/
175+
EOS_DECLARE_FUNC(EOS_EResult) EOS_Achievements_CopyAchievementDefinitionByIndex(EOS_HAchievements Handle, const EOS_Achievements_CopyAchievementDefinitionByIndexOptions* Options, EOS_Achievements_Definition ** OutDefinition);
176+
177+
/**
178+
* DEPRECATED! Use EOS_Achievements_CopyAchievementDefinitionV2ByAchievementId instead.
179+
*
180+
* Fetches an achievement definition from a given achievement ID.
181+
*
182+
* @param Options Structure containing the achievement ID being accessed
183+
* @param OutDefinition The achievement definition for the given achievement ID, if it exists and is valid, use EOS_Achievements_Definition_Release when finished
184+
*
185+
* @see EOS_Achievements_Definition_Release
186+
* @see EOS_Achievements_CopyAchievementDefinitionV2ByAchievementId
187+
*
188+
* @return EOS_Success if the information is available and passed out in OutDefinition
189+
* EOS_InvalidParameters if you pass a null pointer for the out parameter
190+
* EOS_NotFound if the achievement definition is not found
191+
*/
192+
EOS_DECLARE_FUNC(EOS_EResult) EOS_Achievements_CopyAchievementDefinitionByAchievementId(EOS_HAchievements Handle, const EOS_Achievements_CopyAchievementDefinitionByAchievementIdOptions* Options, EOS_Achievements_Definition ** OutDefinition);
193+
194+
/**
195+
* DEPRECATED! Use EOS_Achievements_GetPlayerAchievementCount, EOS_Achievements_CopyPlayerAchievementByIndex and filter for unlocked instead.
196+
*
197+
* Fetch the number of unlocked achievements that are cached locally.
198+
*
199+
* @param Options The Options associated with retrieving the unlocked achievement count
200+
*
201+
* @see EOS_Achievements_CopyUnlockedAchievementByIndex
202+
*
203+
* @return Number of unlocked achievements or 0 if there is an error
204+
*/
205+
EOS_DECLARE_FUNC(uint32_t) EOS_Achievements_GetUnlockedAchievementCount(EOS_HAchievements Handle, const EOS_Achievements_GetUnlockedAchievementCountOptions* Options);
206+
207+
/**
208+
* DEPRECATED! Use EOS_Achievements_CopyPlayerAchievementByAchievementId instead.
209+
*
210+
* Fetches an unlocked achievement from a given index.
211+
*
212+
* @param Options Structure containing the Product User ID and index being accessed
213+
* @param OutAchievement The unlocked achievement data for the given index, if it exists and is valid, use EOS_Achievements_UnlockedAchievement_Release when finished
214+
*
215+
* @see EOS_Achievements_UnlockedAchievement_Release
216+
*
217+
* @return EOS_Success if the information is available and passed out in OutAchievement
218+
* EOS_InvalidParameters if you pass a null pointer for the out parameter
219+
* EOS_NotFound if the unlocked achievement is not found
220+
*/
221+
EOS_DECLARE_FUNC(EOS_EResult) EOS_Achievements_CopyUnlockedAchievementByIndex(EOS_HAchievements Handle, const EOS_Achievements_CopyUnlockedAchievementByIndexOptions* Options, EOS_Achievements_UnlockedAchievement ** OutAchievement);
222+
223+
/**
224+
* DEPRECATED! Use EOS_Achievements_CopyPlayerAchievementByAchievementId instead.
225+
*
226+
* Fetches an unlocked achievement from a given achievement ID.
227+
*
228+
* @param Options Structure containing the Product User ID and achievement ID being accessed
229+
* @param OutAchievement The unlocked achievement data for the given achievement ID, if it exists and is valid, use EOS_Achievements_UnlockedAchievement_Release when finished
230+
*
231+
* @see EOS_Achievements_UnlockedAchievement_Release
232+
*
233+
* @return EOS_Success if the information is available and passed out in OutAchievement
234+
* EOS_InvalidParameters if you pass a null pointer for the out parameter
235+
* EOS_NotFound if the unlocked achievement is not found
236+
*/
237+
EOS_DECLARE_FUNC(EOS_EResult) EOS_Achievements_CopyUnlockedAchievementByAchievementId(EOS_HAchievements Handle, const EOS_Achievements_CopyUnlockedAchievementByAchievementIdOptions* Options, EOS_Achievements_UnlockedAchievement ** OutAchievement);
238+
239+
/**
240+
* DEPRECATED! Use EOS_Achievements_AddNotifyAchievementsUnlockedV2 instead.
241+
*
242+
* Register to receive achievement unlocked notifications.
243+
* @note If the returned NotificationId is valid, you must call EOS_Achievements_RemoveNotifyAchievementsUnlocked when you no longer wish to have your NotificationHandler called.
244+
*
245+
* @see EOS_Achievements_RemoveNotifyAchievementsUnlocked
246+
*
247+
* @param Options Structure containing information about the achievement unlocked notification
248+
* @param ClientData Arbitrary data that is passed back to you in the CompletionDelegate
249+
* @param NotificationFn A callback that is fired when an achievement unlocked notification for a user has been received
250+
*
251+
* @return handle representing the registered callback
252+
*/
253+
EOS_DECLARE_FUNC(EOS_NotificationId) EOS_Achievements_AddNotifyAchievementsUnlocked(EOS_HAchievements Handle, const EOS_Achievements_AddNotifyAchievementsUnlockedOptions* Options, void* ClientData, const EOS_Achievements_OnAchievementsUnlockedCallback NotificationFn);

0 commit comments

Comments
 (0)