CTR Pia
4.11.3
Game Communication Engine
Main Page
Namespace List
Class List
Class Index
Related Pages
Search Results
session_definitions.h
1
/*---------------------------------------------------------------------------*
2
Project: Pia
3
File: session_definitions.h
4
5
Copyright Nintendo. 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
14
15
#pragma once
16
17
18
#include <pia/definitions.h>
19
#include <pia/common/common_Trace.h>
20
#include <pia/session/session_types.h>
21
22
// Macro for Pia developers to use for checking the session status during a job.
23
#define CHECK_SESSION_STATUS() \
24
{ \
25
nn::pia::session::Session::Status status = nn::pia::session::Session::GetInstance()->GetStatus(); \
26
if (status == nn::pia::session::Session::STATUS_DISCONNECTED_NETWORK) \
27
{ \
28
m_pAsyncContext->SignalFailure(nn::pia::ResultNetworkConnectionIsLost()); \
29
m_pAsyncContext = NULL; \
30
return common::Job::EXECUTE_STATE_COMPLETE; \
31
} \
32
}
33
34
#define CHECK_SESSION_CONNECTED_STATUS() \
35
{ \
36
nn::pia::session::Session::Status status = nn::pia::session::Session::GetInstance()->GetStatus(); \
37
if (status == nn::pia::session::Session::STATUS_DISCONNECTED_SESSION) \
38
{ \
39
m_pAsyncContext->SignalFailure(nn::pia::ResultSessionConnectionIsLost()); \
40
m_pAsyncContext = NULL; \
41
return common::Job::EXECUTE_STATE_COMPLETE; \
42
} \
43
}
include
pia
session
session_definitions.h
© 2013–2017 Nintendo. All rights reserved. All company and product names in this document are the trademarks or registered trademarks of their respective companies.