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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
|
/********************************************************
* *
* Copyright (C) Microsoft. All rights reserved. *
* *
********************************************************/
// Sentient Client UGC API
//
// Include this to get access to all UGC related Sentient features
#pragma once
// Local headers
#include "SenClientMarkers.h"
#include "SenClientUGCLeaderboards.h"
#include "SenClientUGCTypes.h"
// Sentient headers
#include "SenClientSys.h"
#include "SenClientCulture.h"
namespace Sentient
{
/**********************************
***** UGC Creation Functions *****
**********************************/
/// @brief Generate a unique ID that will be used to
/// identify a given instance of UGC. This ID
/// will is referenced by every other UGC function.
///
/// @param[in] userIndex
/// The index of the initiating user on the console.
/// Note: This is NOT a XUID.
///
/// @param[out] outResult
/// The unique ID that has been generated and provisioned
/// for an instance of UGC.
///
/// @param[in] userCallback
/// If this call returns a success code,
/// the userCallback will be called at the end of the
/// asynchronous process.
///
/// @param[in] userCallbackData
/// Data to be passed to the @a userCallback on completion.
///
/// @return TBD
///
/// @details All UGC functions require a uniquely provisioned UGC ID.
///
/// @related All UGC related functions.
HRESULT SenUGCCreatePublishingUGCID(
int userIndex,
SenUGCID *outResult,
SenSysCompletedCallback userCallback,
void *userCallbackData );
///
/// @brief Async output information for SenUGCUpload or Download callers
///
/// @details Contains progress or retry information in addition to a cancellation token
///
struct SenUGCProgressInfo
{
SenHandle out_taskHandle; /// token for canceling the upload process
INT8 percentageComplete; /// 1-100, how much percent is complete of upload process for blob
size_t bytesCompleted; /// how many bytes have been successfully transmitted for the task
HRESULT lastStepResult; /// sentient client SDK HRESULT value
int numRetries; /// does not reset between internal steps for a long-running task
};
//************************************
// Method: SenUGCUpload
// FullName: Sentient::SenUGCUpload
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenUGCID ugcID
// Parameter: const SenUGCMetaData * metaData
// Parameter: int nrMainDataBlobs
// Parameter: const void * * mainDataBlobs
// Parameter: const size_t * mainDataBlobSizes
// Parameter: bool pushToFeed
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Upload the metadata, as well as one or more binary data blobs to the server.
// There are multiple data blobs supported (the exact number is defined in
// SenUGCMainData_NrBlobs). One use would be that a game may want store a
// preview thumbnail that can be downloaded without having to download the
// rest of the UGC. This could save bandwidth and make the game more responsive.
// Note: data blob 0 should be the main level data blob, for the automatic
// download counter to work.
// The metadata will also have a data blob associated, but this should be
// kept to a minimum, as UGC download menus will probably want to download
// metadata for a lot of UGCs at once.
// Note: if a level has been uploaded with main data before, and the creator
// wants to just modify the metadata, they can upload the metadata with the
// maindatablobs being NULL.
// NOTE: for large items, use the SenUGCUploadMainData method with the SenUGCProgressInfo
// signature so you can get the running progress and a cancellation token
// to abort the upload (allowing UI for the user, etc)
//************************************
HRESULT SenUGCUpload(
int userIndex,
SenUGCID ugcID,
const SenUGCMetaData *metaData,
int nrMainDataBlobs,
const void **mainDataBlobs,
const size_t *mainDataBlobSizes,
SenSysCompletedCallback userCallback,
void *userCallbackData );
//************************************
// Method: SenUGCUploadMetadata
// FullName: Sentient::SenUGCUploadMetadata
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenUGCID ugcID
// Parameter: const SenUGCMetaData * metaData
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Upload the metadata and one binary data blob to the server.
// NOTE: data blob at index 0 should be the main level data blob, for the automatic
// download counter to work.
// The metadata will also have a data blob associated, but this should be
// kept to a minimum, as UGC download menus will probably want to download
// metadata for a lot of UGCs at once.
// NOTE: If a creator uploads metadata again, it will overwrite the previous
// stored blob with the new one.
//************************************
HRESULT SenUGCUploadMetadata(
int userIndex,
SenUGCID ugcID,
const SenUGCMetaData* metaData,
SenSysCompletedCallback userCallback,
void* userCallbackData);
//************************************
// Method: SenUGCUploadMainData
// FullName: Sentient::SenUGCUploadMainData
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenUGCID ugcID
// Parameter: int mainDataBlobIndex
// Parameter: const void * mainDataBlob
// Parameter: const size_t mainDataBlobSize
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Parameter: SenUGCProcessInfo* out_ugcUploadInfo
// Upload one binary data blob to the server.
// This SenUGCUpload method with the SenUGCProcessInfo signature is so you
// can get the progress percentage and a cancellation token, which can
// be used to abort the upload. This is useful for large uploads where
// you may want to allow the user to cancel.
// NOTE: This call is asynchronous ONLY and will error for synchronous
// attempts with a NULL param for userCallback.
// There are multiple data blobs supported (the exact number is defined in
// SenUGCMainData_NrBlobs) on subsequent calls. Slot zero is to be used by a
// game to store a preview thumbnail, which can then be downloaded without
// having to download the rest of the UGC. This could save bandwidth and
// make the game more responsive.
// NOTE: data blob at index 0 should be the main level data blob, for the automatic
// download counter to work.
// The metadata will also have a data blob associated, but this should be
// kept to a minimum, as UGC download menus will probably want to download
// metadata for a lot of UGCs at once.
// NOTE: if a level has been uploaded with main data before, and the creator
// wants to just modify the metadata, they can upload the metadata with the
// main data blob being NULL.
// NOTE: If a creator uploads a data blob again, it will overwrite the previous
// stored blob with the new one.
//************************************
HRESULT SenUGCUploadMainDataBlob(
int userIndex,
SenUGCID ugcID,
int mainDataBlobIndex,
const void* mainDataBlob,
const size_t mainDataBlobSize,
SenSysCompletedCallback userCallback,
void* userCallbackData,
SenUGCProgressInfo* out_progressInfo);
//************************************
// Method: SenUGCDelete
// FullName: Sentient::SenUGCDelete
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenUGCID ugcID
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Delete the UGC - only the user that created the UGC can delete it.
//************************************
HRESULT SenUGCDelete(
int userIndex,
SenUGCID ugcID,
SenSysCompletedCallback userCallback,
void* userCallbackData );
/*************************************
***** UGC Consumption Functions *****
*************************************/
//************************************
// Method: SenUGCEnumerate
// FullName: Sentient::SenUGCEnumerate
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenSysTitleID titleID
// Parameter: SenUGCSortBy sortBy
// Parameter: SenUGCType type
// Parameter: SenUGCAuthorType authorType
// Parameter: int nrAuthors
// Parameter: const XUID * authorList
// Parameter: SenUGCMetaDataFlags metaDataFlagFilter
// Parameter: SenUGCPublishState minPublishStateFilter
// Parameter: SenUGCPublishState maxPublishStateFilter
// Parameter: SenSysDateTime newerThan
// Parameter: SenUGCDescriptor descriptor
// Parameter: int maxNrResults
// Parameter: SenUGCSearchResult * outBuffer
// Parameter: unsigned int * outNrResults
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Search the database for all the UGCs that match various search criteria.
// outBuffer should be an preallocated array of [sizeof(SenUGCSearchResult)*maxNrResults] bytes.
//************************************
HRESULT SenUGCEnumerate(
int userIndex,
SenSysTitleID titleID,
SenUGCSortBy sortBy,
SenUGCType type,
SenUGCAuthorType authorType,
int nrAuthors,
const PlayerUID *authorList,
SenUGCMetaDataFlags metaDataFlagFilter,
SYSTEMTIME *newerThan,
SenUGCDescriptor descriptor,
int maxNrResults,
SenUGCSearchResult *outBuffer,
UINT *outNrResults,
SenSysCompletedCallback userCallback,
void* userCallbackData );
/// @brief public
///
/// @param[in] userIndex
/// @param[in] titleID
/// @param[in] sortBy
/// @param[in] type
/// @param[in] authorType
/// @param[in] nrAuthors
/// @param[in] authorList
/// @param[in] metaDataFlagFilter
/// @param[in] newerThan
/// @param[in] nrDescriptors
/// @param[in] descriptors
/// @param[in] maxNrResults
/// @param[out] outBuffer
/// @param[out] outNrResults
/// @param[in] userCallback
/// @param[in] userCallbackData
///
/// @return Search the database for all the UGCs that match various search criteria.
/// outBuffer should be an preallocated array of [sizeof(SenUGCSearchResult)*maxNrResults] bytes.
///
/// @details Enumerate by name will perform a look based on a various search criteria. The Collection
/// of descriptors will perform an equality lookup on Descriptor
///
/// @related SenUGCEnumerate
HRESULT SenUGCEnumerate(
int userIndex,
SenSysTitleID titleID,
SenUGCSortBy sortBy,
SenUGCType type,
SenUGCAuthorType authorType,
int nrAuthors,
const PlayerUID *authorList,
SenUGCMetaDataFlags metaDataFlagFilter,
SYSTEMTIME *newerThan,
int nrDescriptors,
INT64 *descriptors,
int maxNrResults,
SenUGCSearchResult *outBuffer,
UINT *outNrResults,
SenSysCompletedCallback userCallback,
void* userCallbackData );
/// @brief public
///
/// @param[in] userIndex
/// @param[in] titleID
/// @param[in] sortBy
/// @param[in] type
/// @param[in] authorType
/// @param[in] nrAuthors
/// @param[in] authorList
/// @param[in] metaDataFlagFilter
/// @param[in] newerThan
/// @param[in] nrDescriptors
/// @param[in] descriptors
/// @param[in] maxNrResults
/// @param[out] outBuffer
/// @param[out] outNrResults
/// @param[in] userCallback
/// @param[in] userCallbackData
///
/// @return Search the database for all the UGCs that match various search criteria.
/// outBuffer should be an preallocated array of [sizeof(SenUGCSearchResult)*maxNrResults] bytes.
///
/// @details Enumerate by Descriptor using a Logical And against all submitted Descriptor values.
/// The API filters the results on a specific UGC Type as well as an author
/// list type. Author List type of Everyone is NOT supported.
/// Note: The collection of descriptor bit masks is constrained to four.
///
/// @related SenUGCEnumerate
HRESULT SenUGCEnumerateByDescriptorWithLogicalAnd(
int userIndex,
SenSysTitleID titleID,
SenUGCSortBy sortBy,
SenUGCType type,
SenUGCAuthorType authorType,
int nrAuthors,
const PlayerUID *authorList,
SenUGCMetaDataFlags metaDataFlagFilter,
SYSTEMTIME *newerThan,
int nrDescriptors,
INT64 *descriptors,
int maxNrResults,
SenUGCSearchResult *outBuffer,
UINT *outNrResults,
SenSysCompletedCallback userCallback,
void* userCallbackData );
/// @brief public
///
/// @param[in] userIndex
/// @param[in] titleID
/// @param[in] type
/// @param[in] authorType
/// @param[in] nrAuthors
/// @param[in] authorList
/// @param[in] name
/// @param[in] maxNrResults
/// @param[out] outBuffer
/// @param[out] outNrResults
/// @param[in] userCallback
/// @param[in] userCallbackData
///
/// @return Search the database for all the UGCs that match various search criteria.
/// outBuffer should be an preallocated array of [sizeof(SenUGCSearchResult)*maxNrResults] bytes.
///
/// @details Enumerate by name will perform a wild card lookup on UGC name. The lookup will return anything
/// in the range of "%<NAME>%". The API filters the results on a specific UGC Type as well as an author
/// list type. Author List type of Everyone is NOT supported.
///
/// @related SenUGCEnumerate
__declspec(deprecated("Use SenUGCEnumerateByName() instead"))
HRESULT SenUGCEnumerate(
int userIndex,
SenSysTitleID titleID,
SenUGCType type,
SenUGCAuthorType authorType,
int nrAuthors,
const PlayerUID *authorList,
const wchar_t *name,
int maxNrResults,
SenUGCSearchResult *outBuffer,
UINT *outNrResults,
SenSysCompletedCallback userCallback,
void* userCallbackData );
/// @brief public
///
/// @param[in] userIndex
/// @param[in] titleID
/// @param[in] type
/// @param[in] authorType
/// @param[in] nrAuthors
/// @param[in] authorList
/// @param[in] name
/// @param[in] performWildCardLookup
/// @param[in] maxNrResults
/// @param[out] outBuffer
/// @param[out] outNrResults
/// @param[in] userCallback
/// @param[in] userCallbackData
///
/// @return Search the database for all the UGCs that match various search criteria.
/// outBuffer should be an preallocated array of [sizeof(SenUGCSearchResult)*maxNrResults] bytes.
///
/// @details Enumerate by name will perform an exact or wild card string lookup on UGC name. The API filters the results
/// on a specific UGC Type as well as an author list type. Author List type of Everyone is NOT supported.
///
/// @related SenUGCEnumerate
HRESULT SenUGCEnumerateByName(
int userIndex,
SenSysTitleID titleID,
SenUGCType type,
SenUGCAuthorType authorType,
int nrAuthors,
const PlayerUID *authorList,
const wchar_t *name,
bool performWildCardLookup,
int maxNrResults,
SenUGCSearchResult *outBuffer,
UINT *outNrResults,
SenSysCompletedCallback userCallback,
void* userCallbackData );
//************************************
// Method: SenUGCDownloadMetaData
// FullName: Sentient::SenUGCDownloadMetaData
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenSysTitleID titleID
// Parameter: int nrUGCs
// Parameter: const SenUGCID * ugcIDList
// Parameter: SenUGCDownloadedMetaData2 * outBuffer
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Download the metadata for an array of UGCs
// Note that the metadata structure is a superset of the uploaded metadata,
// with various other information exposed.
// outBuffer should be an preallocated array of [(sizeof(SenUGCDownloadedMetaData)+SenUGCMetaData::BlobSizeLimit)*nrUGCs] bytes.
// This new signature is compatible with resubmission feature and 64-bit UGC Ids.
//************************************
HRESULT SenUGCDownloadMetaData(
int userIndex,
SenSysTitleID titleID,
int nrUGCs,
const SenUGCID *ugcIDList,
SenUGCDownloadedMetaData2 *out_metaData,
size_t *out_metaDataCount,
SenSysCompletedCallback userCallback,
void *userCallbackData );
__declspec(deprecated("Use signature with SenUGCDownloadedMetaData2."))
HRESULT SenUGCDownloadMetaData(
int userIndex,
SenSysTitleID titleID,
int nrUGCs,
const SenUGCID *ugcIDList,
SenUGCDownloadedMetaData *out_metaData,
size_t *out_metaDataCount,
SenSysCompletedCallback userCallback,
void *userCallbackData );
//************************************
// Method: SenUGCDownloadMainDataBlob
// FullName: Sentient::SenUGCDownloadMainDataBlob
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenUGCID ugcID
// Parameter: int mainDataBlobID
// Parameter: size_t bufferSize
// Parameter: UINT blobVersion
// Parameter: void * outBuffer
// Parameter: size_t * outSize
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Download a single blob of UGC data
// note that zero byte downloads will fail.
// ID, blobVersion, and bufferSize should be coming
// from SenUGCDownloadedMetaData.
// outBuffer should be an preallocated array of bufferSize bytes.
//************************************
HRESULT SenUGCDownloadMainDataBlob(
int userIndex,
SenSysTitleID titleID,
SenUGCID ugcID,
UINT mainDataBlobIndex,
size_t bufferSize,
UINT blobVersion,
void *outBuffer,
size_t *outSize,
SenSysCompletedCallback userCallback,
void *userCallbackData );
__declspec(deprecated("Use signature with blobVersion."))
HRESULT SenUGCDownloadMainDataBlob(
int userIndex,
SenSysTitleID titleID,
SenUGCID ugcID,
int mainDataBlobIndex,
size_t bufferSize,
void *outBuffer,
size_t *outBytesReceived,
SenSysCompletedCallback userCallback,
void *userCallbackData );
//************************************
// Method: SenUGCDownloadMainDataBlob
// FullName: Sentient::SenUGCDownloadMainDataBlob
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenUGCID ugcID
// Parameter: int mainDataBlobID
// Parameter: size_t bufferSize
// Parameter: UINT blobVersion
// Parameter: void * outBuffer
// Parameter: size_t * outBytesReceived
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Download a single blob of UGC data
// NOTE: zero byte downloads will fail.
// ID, mainDataRevision and bufferSize should be coming from a
// SenUGCDownloadedMetaData2 (where bufferSize comes from
// SenUGCDownloadedMetaData2's BlobInfo[mainDataBlobID].Size).
// outBuffer should be an preallocated array of bufferSize bytes.
// This signature includes an out param to include the progress
// percentage and cancellation token, etc to monitor and abort
// long running downloads (can be wired up to UI for users).
// BlobVersion is the version of the blob you want to download,
// which is available on the metadata information for the
// main data blobs (via DownloadMetaData).
//************************************
HRESULT SenUGCDownloadMainDataBlob(
int userIndex,
SenSysTitleID titleID,
SenUGCID ugcID,
UINT mainDataBlobIndex,
size_t bufferSize,
UINT blobVersion,
void *outBuffer,
size_t *outBytesReceived,
SenSysCompletedCallback userCallback,
void *userCallbackData,
SenUGCProgressInfo* out_progressInfo);
__declspec(deprecated("Use signature with blobVersion."))
HRESULT SenUGCDownloadMainDataBlob(
int userIndex,
SenSysTitleID titleID,
SenUGCID ugcID,
int mainDataBlobIndex,
size_t bufferSize,
void *outBuffer,
size_t *outBytesReceived,
SenSysCompletedCallback userCallback,
void *userCallbackData,
SenUGCProgressInfo* out_progressInfo);
/**********************************************
***** UGC Reviewing and Rating Functions *****
**********************************************/
//************************************
// Method: SenUGCSetReviewScore
// FullName: Sentient::SenUGCSetReviewScore
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenUGCID ugcId
// Parameter: SenUGCReviewScoreType type
// Parameter: UINT score
// Parameter: bool isFavorite
// Parameter: SenSysCompletedCallback callback
// Parameter: void * callbackData
//************************************
HRESULT SenUGCSetReviewScore(
int userIndex,
SenUGCID ugcId,
SenUGCReviewScoreType type,
unsigned int score,
bool isFavorite,
SenSysCompletedCallback callback,
void *callbackData );
//************************************
// Method: SenUGCGetReviewScore
// FullName: Sentient::SenUGCGetReviewScore
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenUGCID ugcId
// Parameter: SenUGCReviewScoreType type
// Parameter: UINT * out_score
// Parameter: SenSysCompletedCallback callback
// Parameter: void * callbackData
//************************************
HRESULT SenUGCGetReviewScore(
int userIndex,
SenUGCID ugcId,
SenUGCReviewScoreType type,
unsigned int *out_score,
SenSysCompletedCallback callback,
void *callbackData );
//************************************
// Method: SenUGCSetFavoriteFlag
// FullName: Sentient::SenUGCSetFavoriteFlag
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenSysTitleID titleID
// Parameter: SenUGCID ugcID
// Parameter: bool isFavorite
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Users can flag the UGCs that they really like, which can be used for
// the search results
//************************************
HRESULT SenUGCSetFavoriteFlag(
int userIndex,
SenSysTitleID titleID,
SenUGCID ugcID,
BOOL isFavorite,
SenSysCompletedCallback userCallback,
void *userCallbackData );
//************************************
// Method: SenUGCGetFavoriteFlag
// FullName: Sentient::SenUGCGetFavoriteFlag
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenSysTitleID titleID
// Parameter: SenUGCID ugcID
// Parameter: BOOL * outResult
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Users can flag the UGCs that they really like, which can be used for
// the search results
//************************************
HRESULT SenUGCGetFavoriteFlag(
int userIndex,
SenSysTitleID titleID,
SenUGCID ugcID,
BOOL *outResult,
SenSysCompletedCallback userCallback,
void *userCallbackData );
//************************************
// Method: SenUGCGetFriendFavoriteCount
// FullName: Sentient::SenUGCGetFriendFavoriteCount
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenSysTitleID titleID
// Parameter: SenUGCID ugcID
// Parameter: int * outResult
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Find out how many friends of the user have flagged this UGC as
// a favorite (inclusive the user's favorite flag also)
//************************************
HRESULT SenUGCGetFriendFavoriteCount(
int userIndex,
SenSysTitleID titleID,
SenUGCID ugcID,
int *outResult,
SenSysCompletedCallback userCallback,
void *userCallbackData );
//************************************
// Method: SenUGCAddToCustomCounters
// FullName: Sentient::SenUGCAddToCustomCounters
// Access: public
// Returns: HRESULT
// Qualifier:
// Parameter: int userIndex
// Parameter: SenSysTitleID titleID
// Parameter: SenUGCID ugcID
// Parameter: INT64 customCounters[SenUGCDownloadedMetaData_NrCustomCounters]
// Parameter: SenSysCompletedCallback userCallback
// Parameter: void * userCallbackData
// Users can add to a fixed number of global counters stored on the
// servers, to count up a few basic stats per UGC (number of deaths,
// number of enemies killed, total playtime etc.)
//************************************
HRESULT SenUGCAddToCustomCounters(
int userIndex,
SenSysTitleID titleID,
SenUGCID ugcID,
INT64 customCounters[SenUGCDownloadedMetaData_NrCustomCounters],
SenSysCompletedCallback userCallback,
void* userCallbackData );
/// @brief API to flag a given piece of UGC as offensive.
///
/// @param[in] userIndex
/// The index of the initiating user on the console.
/// Note: This is NOT a XUID.
///
/// @param[in] ugcID
/// The unique ID for an instance of UGC.
///
/// @param[in] offensivenessFlag
/// Offensive flag type.
///
/// @param[in] reason
/// Reason for marking a given piece of UGC as offensive.
///
/// @param[in] userCallback
/// If this call returns a success code,
/// the userCallback will be called at the end of the
/// asynchronous process.
///
/// @param[in] userCallbackData
/// Data to be passed to the @a userCallback on completion.
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success.
/// Specific values include:
///
/// @details Users can flag a level that they think is offensive. The goal is that
/// the Sentient system will automatically be able to take down
/// levels after enough people have flagged a UGC as bad.
/// The number of votes to take something down will depend on the
/// reliability of the reviewers (number of offensiveness flags vs number of
/// downloads etc.) as well as the number of offensive uploads by the creator.
/// This function is also used by moderators to confirm or deny something as
/// being offensive.
///
/// @related <Related API>
HRESULT SenUGCSetOffensivenessFlag(
int userIndex,
SenUGCID ugcID,
SenUGCOffensivenessFlag offensivenessFlag,
const wchar_t *reason,
SenSysCompletedCallback userCallback,
void *userCallbackData );
/// @brief This function will return whether or not a particular
/// piece of UGC has been banned.
///
/// @param[in] userIndex
/// The index of the initiating user on the console.
/// Note: This is NOT a XUID.
///
/// @param[in] The unique ID for UGC.
///
/// @param[in] True if content is banned (and should not be viewed by user).
///
/// @param[in] userCallback
/// If this call returns a success code,
/// the userCallback will be called at the end of the
/// asynchronous process.
///
/// @param[in] userCallbackData
/// Data to be passed to the @a userCallback on completion.
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success.
/// Specific values include:
///
/// @details Any piece of UGC can been banned by a moderator or
/// moderation engine. This API allows clients to verify
/// if a given piece of UGC has been banned.
///
/// @related SenUGCCreatePublishingUGCID()
/// @related SenUGCSetOffensivenessFlag()
/// @related SenUGCPublish()
HRESULT SenUGCIsBanned(
int userIndex,
SenUGCID ugcID,
BOOL *out_result,
SenSysCompletedCallback userCallback,
void *userCallbackData );
/*********************
***** UGC Feeds *****
*********************/
/// @brief UGC Feed information
///
/// @details When enumerating feeds, these are the available feeds that can be retrieved.
///
struct SenUGCFeedInfo
{
SenUGCFeedType feedType;
wchar_t Name[32];
wchar_t Description[128];
};
/// @brief Retrieves a specific feed based on feedtype.
///
/// @param[in] userIndex
/// The index of the initiating user on the console.
/// Note: This is NOT a XUID.
///`
/// @param[in] titleID
///
/// @param[in] feedType
/// Feed Type identifier for for the given feed being retrieved.
///
/// @param[in] maxNumberOfFeedItems
/// Used to indicate the number of items to be returned by @a out_feedInfo.
/// If the actual number of items exceeds this, you will receive an error.
///
/// @param[out] out_buffer
/// Pointer to the collection of structures to fill with SenUGCFeedItem data.
///
/// @param[out] out_buffersize
/// The number of entries actually enumerated by the call.
///
/// @param[in] userCallback
/// If this call returns a success code,
/// the userCallback will be called at the end of the
/// asynchronous process.
///
/// @param[in] userCallbackData
/// Data to be passed to the @a userCallback on completion.
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success.
/// Specific values include:
/// E_POINTER: out_buffer or out_buffersize are null.
///
/// @details <Insert detailed method documentation>
///
/// @related SenUGCEnumerateFeeds()
HRESULT SenUGCGetFeed(
int userIndex,
SenSysTitleID titleID,
SenUGCFeedType feedType,
size_t maxNumberOfFeedItems,
SenUGCFeedItem *out_buffer,
UINT *out_buffersize,
SenSysCompletedCallback userCallback,
void *userCallbackData );
/// @brief Retrieves a collection of feeds that are viewable by the
/// current user.
///
/// @param[in] userIndex
/// The index of the initiating user on the console.
/// Note: This is NOT a XUID.
///
/// @param[in] culture
/// This is the result of a call to SenCultureFind() or SenCultureGet*().
/// You may also pass NULL to use the culture set with SenCultureSetCurrent().
/// May be NULL for default culture.
///
/// @param[in] maxResults
/// Used to indicate the number of items to be returned by @a out_feedInfo.
/// If the actual number of items exceeds this, you will receive an error.
///
/// @param[out] out_feedInfo
/// Pointer to a collection of structures to fill with SenUGCFeedInfo data.
///
/// @param[out] out_resultCount
/// The number of entries actually enumerated by the call.
///
/// @param[in] userCallback
/// If this call returns a success code,
/// the userCallback will be called at the end of the
/// asynchronous process.
///
/// @param[in] userCallbackData
/// Data to be passed to the @a userCallback on completion.
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success.
/// Specific values include:
/// E_POINTER: out_feedInfo or out_resultCount are null.
///
/// @details <Insert detailed method documentation>
///
/// @related SenUGCGetFeed()
HRESULT SenUGCEnumerateFeeds(
int userIndex,
size_t maxResults,
SenUGCFeedInfo *out_feedInfo,
size_t *out_resultCount,
SenSysCompletedCallback userCallback,
void *userCallbackData);
/// @brief API that publishes UGC and makes the content accessible
/// to everyone on the Sentient service.
///
/// @param[in] userIndex
/// The index of the initiating user on the console.
/// Note: This is NOT a XUID.
///
/// @param[in] ugcID
/// The unique ID for an instance of UGC.
///
/// @param[in] leaderboardDefinition
/// Optional parameter. Definition for a Leaderboard that
/// will be created and associated to newly published UGC.
///
/// @param[out] out_leaderboardId
/// Created Leaderboard Id. Only returned to the client if
/// a Leaderboards Definition is passed to the server.
///
/// @param[in] userCallback
/// If this call returns a success code,
/// the userCallback will be called at the end of the
/// asynchronous process.
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success.
/// Specific values include:
///
/// @details UGC is only accessible to the author until it has been published.
/// The user making the call must be the author of the UGC item.
/// The call will fail if this UGC item has previously been published.
/// By supplying an optional Leaderboard definition a Leaderboard is automatically
// allocated and associated with the UGC item.
/// This is the preferred way of creating UGC Leaderboards.
///
/// @related SenCreateLeaderboard()
HRESULT SenUGCPublish(
int userIndex,
SenUGCID ugcID,
const SenLeaderboardDefinition *leaderboardDefinition,
SenLeaderboardId *out_leaderboardId,
SenSysCompletedCallback userCallback,
void *userCallbackData);
/// @brief API that publishes a new version of a UGC item and makes the revised content accessible
/// to everyone on the Sentient service.
///
/// @param[in] userIndex
/// The index of the initiating user on the console.
/// Note: This is NOT a XUID.
///
/// @param[in] ugcID
/// The unique ID for an instance of UGC.
///
/// @param[in] userCallback
/// If this call returns a success code,
/// the userCallback will be called at the end of the
/// asynchronous process.
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success.
/// Specific values include:
///
/// @details New versions of UGC are only accessible to the author until it has been republished.
/// The user making the call must be the author of the UGC item.
///
/// @related SenUGCPublish()
HRESULT SenUGCRepublish(
int userIndex,
SenUGCID ugcID,
SenSysCompletedCallback userCallback,
void* userCallbackData);
} // namespace Sentient
|