1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     phtsel_input.h
4 
5   Copyright (C)2009-2012 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev:$
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_PHTSEL_CTR_PHTSEL_INPUT_H_
17 #define NN_PHTSEL_CTR_PHTSEL_INPUT_H_
18 
19 /* Please see man pages for details
20 
21 
22 */
23 
24 #include <nn/types.h>
25 #include <nn/fnd.h>
26 
27 #ifdef  __cplusplus
28 
29 namespace nn {
30 namespace phtsel {
31 namespace CTR {
32 
33 /*
34 
35 
36 
37  */
38 struct DateTimeConvert
39 {
40 public:
41     s64     seconds;   //
42 
43 public:
44     /*
45 
46 
47 
48 
49       */
50     static const DateTimeConvert&   GetMinSeconds();
51     /*
52 
53 
54 
55 
56       */
57     static const DateTimeConvert&   GetMaxSeconds();
58 
59     /*
60 
61 
62       */
GetSecondsDateTimeConvert63     s64     GetSeconds() const{ return seconds; }
64     /*
65 
66 
67       */
68     void    SetSeconds(s64 seconds);
69 
70 
71     /*=======================================================================
72       Seconds elapsed <--> YYYY/MM/DD HH:MM:SS
73       =======================================================================*/
74     /*
75 
76 
77 
78 
79 
80 
81 
82       */
83     void    ConvertToParam(
84                 s32* pYear, s32* pMonth, s32* pDay,
85                 s32* pHour, s32* pMinute, s32* pSecond
86             ) const;
87     /*
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100       */
101     bool    ConvertFromParam(
102                 s32 year, s32 month, s32 day,
103                 s32 hour, s32 minute, s32 second
104             );
105 
106     /*=======================================================================
107       Seconds elapsed <--> type nn:fnd::DateTime
108       =======================================================================*/
109     /*
110 
111 
112       */
113     nn::fnd::DateTime    ConvertToNNDateTime() const;
114     /*
115 
116 
117       */
118     void    ConvertFromNNDateTime(const nn::fnd::DateTime& dateTime);
119 };
120 
121 /*
122 
123 
124 
125 
126 
127  */
128 struct PhtselInput
129 {
130 public:
131     //----------------------------------------
132     //
133 
134     /* Please see man pages for details
135 
136     */
137     enum ImageKind
138     {
139         IMAGE_KIND_RESERVED_0 = 0, //
140 
141         IMAGE_KIND_JPEG,           //
142         IMAGE_KIND_MP,             //
143         IMAGE_KIND_RESERVED_1,     //
144 
145         IMAGE_KIND_RESERVED_4,     //
146         IMAGE_KIND_RESERVED_5,     //
147         IMAGE_KIND_RESERVED_6,     //
148         IMAGE_KIND_RESERVED_7,     //
149 
150         IMAGE_KIND_NUM = IMAGE_KIND_RESERVED_4   //
151     };
152 
153     /* Please see man pages for details
154 
155     */
156     enum ImageKindBit
157     {
158         IMAGE_KIND_BIT_JPEG    = 1 << IMAGE_KIND_JPEG,    //
159         IMAGE_KIND_BIT_MP      = 1 << IMAGE_KIND_MP,      //
160 
161         //
162         IMAGE_KIND_BIT_PICTURE = IMAGE_KIND_BIT_JPEG
163                                | IMAGE_KIND_BIT_MP
164     };
165 
166     /* Please see man pages for details
167 
168     */
169     static const u16   SHOOTING_TYPE_BIT_DEFAULT = 0xFFFF;
170 
171     /* Please see man pages for details
172 
173     */
174     static const u8    DISTINCTION_TYPE_BIT_DEFAULT = 0;
175 
176     /* Please see man pages for details
177 
178     */
179     enum ScreenShotType
180     {
181         SCREEN_SHOT_TYPE_FLAG_ON,   //
182         SCREEN_SHOT_TYPE_FLAG_OFF,  //
183         SCREEN_SHOT_TYPE_ALL,       //
184         SCREEN_SHOT_TYPE_MAX        //
185     };
186 
187     /* Please see man pages for details
188 
189     */
190     enum FaceType
191     {
192         FACE_TYPE_FLAG_ON,  //
193         FACE_TYPE_FLAG_OFF, //
194         FACE_TYPE_ALL,      //
195         FACE_TYPE_MAX       //
196     };
197 
198 
199     /* Please see man pages for details
200 
201     */
202     static const size_t MAX_FACE_INFO_NUM = 4;
203 
204     /* Please see man pages for details
205 
206     */
207     static const size_t TITLE_UNIQUE_ID_MAX_NUM = 100;
208 
209     /* Please see man pages for details
210 
211     */
212     static const u32    TITLE_UNIQUE_ID_ERROR  = 0xFFFFFFFF;
213 
214     /* Please see man pages for details
215 
216     */
217     enum DistributeType
218     {
219         DISTRIBUTE_TYPE_FLAG_ON,            //
220         DISTRIBUTE_TYPE_FLAG_OFF,           //
221         DISTRIBUTE_TYPE_ALL,                //
222         DISTRIBUTE_TYPE_MAX                 //
223     };
224 
225     /* Please see man pages for details
226 
227     */
228     enum STSize
229     {
230         ST_SIZE_DEFAULT, //
231         ST_SIZE_NUM      //
232     };
233 
234     /* Please see man pages for details
235 
236     */
237     static const size_t MESSAGE_MAX_NUM     = 128;
238 
239     /* Please see man pages for details
240 
241 
242 
243     */
244     static const size_t INPUT_RESERVED_SIZE = 200;
245 
246 protected:
247 
248     /* Please see man pages for details
249 
250 
251 
252     */
253     DateTimeConvert m_nSecStart;
254 
255     /* Please see man pages for details
256 
257 
258 
259     */
260     DateTimeConvert m_nSecEnd;
261 
262     /* Please see man pages for details
263 
264 
265 
266     */
267     u8 m_nStoTypeBit;
268 
269     /* Please see man pages for details
270 
271 
272 
273     */
274     ImageKindBit m_eImgKindBit;
275 
276     /* Please see man pages for details
277 
278 
279 
280     */
281     u16 m_nShootTypeBit;
282 
283     /* Please see man pages for details
284 
285 
286 
287     */
288     s32 m_nMinFaceNum;
289 
290     /* Please see man pages for details
291 
292 
293 
294     */
295     s32 m_nMaxFaceNum;
296 
297     /* Please see man pages for details
298 
299 
300 
301     */
302     u8 m_nDisTypeBit;
303 
304     /* Please see man pages for details
305 
306 
307 
308     */
309     ScreenShotType m_eScrShotType;
310 
311     /* Please see man pages for details
312 
313 
314 
315     */
316     FaceType m_eFaceType;
317 
318 
319     /* Please see man pages for details
320 
321 
322 
323     */
324     DistributeType m_eDistributeType;
325 
326     /* Please see man pages for details
327 
328 
329 
330     */
331     u32 m_nTitleUniqueId[TITLE_UNIQUE_ID_MAX_NUM];
332 
333     /* Please see man pages for details
334 
335 
336 
337     */
338     u8  m_nTitleUniqueIdNum;
339 
340     NN_PADDING3;
341 
342 
343     /* Please see man pages for details
344 
345 
346 
347     */
348     STSize m_eThumbnailSize;
349 
350     /* Please see man pages for details
351 
352 
353 
354     */
355     bool m_bSoundEnable;
356 
357     /* Please see man pages for details
358 
359 
360 
361     */
362     wchar_t m_nMessage[MESSAGE_MAX_NUM];
363 
364     NN_PADDING2;
365 
366     /* Please see man pages for details
367 
368 
369 
370     */
371     u8                  m_reserved[INPUT_RESERVED_SIZE];
372 public:
373 
374     //----------------------------------------
375     //
376 
377     /* Please see man pages for details
378 
379 
380 
381 
382 
383 
384     */
385     void InitAll();
386 
387 
388     //----------------------------------------
389     //
390 
391     /* Please see man pages for details
392 
393 
394 
395 
396 
397     */
398     void SetSecStart(const DateTimeConvert& secondsStart);
399 
400     /* Please see man pages for details
401 
402 
403 
404 
405     */
406     void SetSecEnd(const DateTimeConvert& secondsEnd);
407 
408     /* Please see man pages for details
409 
410 
411 
412 
413     */
414     void SetImgKindBit(ImageKindBit imageKindBit);
415 
416     /* Please see man pages for details
417 
418 
419 
420 
421     */
422     void SetScreenShotType(ScreenShotType screenShotType);
423 
424     /* Please see man pages for details
425 
426 
427 
428 
429     */
430     void SetFaceType(FaceType faceType);
431 
432     /* Please see man pages for details
433 
434 
435 
436 
437     */
438     void SetMinFaceNum(s32 minFaceNum);
439 
440     /* Please see man pages for details
441 
442 
443 
444 
445     */
446     void SetMaxFaceNum(s32 maxFaceNum);
447 
448     /* Please see man pages for details
449 
450 
451 
452 
453 
454 
455     */
456     void SetTitleUniqueId(u32 titleUniqueId) NN_ATTRIBUTE_DEPRECATED;
457 
458     /* Please see man pages for details
459 
460 
461 
462 
463 
464 
465 
466     */
467     void AddTitleUniqueId(u32 titleUniqueId);
468 
469     /* Please see man pages for details
470 
471 
472 
473     */
474     void ClearTitleUniqueId();
475 
476     /* Please see man pages for details
477 
478 
479 
480 
481     */
482     void SetDistributeType(DistributeType distributeType);
483 
484     /* Please see man pages for details
485 
486 
487 
488 
489     */
490     void SetSoundEnable(bool soundEnable);
491 
492     /* Please see man pages for details
493 
494 
495 
496 
497 
498     */
499     void SetMessage(const wchar_t* message);
500 
501     //----------------------------------------
502     //
503 
504     /* Please see man pages for details
505 
506 
507     */
508     const DateTimeConvert& GetSecStart() const;
509 
510     /* Please see man pages for details
511 
512 
513     */
514     const DateTimeConvert& GetSecEnd() const;
515 
516     /* Please see man pages for details
517 
518 
519 
520 
521     */
522     u8 GetStoTypeBit() const;
523 
524     /* Please see man pages for details
525 
526 
527     */
528     ImageKindBit GetImgKindBit() const;
529 
530     /* Please see man pages for details
531 
532 
533     */
534     u16 GetShootTypeBit() const;
535 
536     /* Please see man pages for details
537 
538 
539     */
540     u8 GetDisTypeBit() const;
541 
542     /* Please see man pages for details
543 
544 
545     */
546     ScreenShotType GetScreenShotType() const;
547 
548     /* Please see man pages for details
549 
550 
551     */
552     FaceType GetFaceType() const;
553 
554     /* Please see man pages for details
555 
556 
557     */
558     s32 GetMinFaceNum() const;
559 
560     /* Please see man pages for details
561 
562 
563     */
564     s32 GetMaxFaceNum() const;
565 
566     /* Please see man pages for details
567 
568 
569 
570 
571 
572 
573     */
574     u32 GetTitleUniqueId(u8 titleUniqueIdIdx) const;
575 
576     /* Please see man pages for details
577 
578 
579 
580 
581 
582     */
583     const u32* GetTitleUniqueIdTbl() const;
584 
585     /* Please see man pages for details
586 
587 
588     */
589     u8 GetTitleUniqueIdNum() const;
590 
591     /* Please see man pages for details
592 
593 
594     */
595     DistributeType GetDistributeType() const;
596 
597     /* Please see man pages for details
598 
599 
600     */
601     STSize GetThumbnailSize() const;
602 
603     /* Please see man pages for details
604 
605 
606     */
607     bool GetSoundEnable() const;
608 
609     /* Please see man pages for details
610 
611 
612     */
613     const wchar_t* GetMessage() const;
614 };
615 
616 } // end of namespace CTR
617 } // end of namespace phtsel
618 } // end of namespace nn
619 
620 #endif /*__cplusplus*/
621 
622 #endif /* NN_PHTSEL_CTR_PHTSEL_INPUT_H_ */
623