• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GSI_UNUSED函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GSI_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ GSI_UNUSED函数的具体用法?C++ GSI_UNUSED怎么用?C++ GSI_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GSI_UNUSED函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: gpiSendOrBufferChar

GPResult
gpiSendOrBufferChar(
  GPConnection * connection,
  GPIPeer_st peer,
  char c
)
{
	//GPIBool closed;
	//int sent;
/*
	assert(peer->outputBuffer.buffer != NULL);

	// Only try to send if the buffer is empty and there are no messages.
	/////////////////////////////////////////////////////////////////////
	if(!(peer->outputBuffer.len - peer->outputBuffer.pos) && !ArrayLength(peer->messages))
	{
		CHECK_RESULT(gpiSendData(connection, peer->sock, &c, 1, &closed, &sent, "PT"));
		if(sent)
			return GP_NO_ERROR;
	}

	// Buffer if not sent.
	//////////////////////
	return gpiAppendCharToBuffer(connection, &peer->outputBuffer, c);
	*/
	GSI_UNUSED(c);
	GSI_UNUSED(peer);
	GSI_UNUSED(connection);
	return GP_NO_ERROR;
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:30,代码来源:gpiBuffer.c


示例2: UCS2ToAsciiString

GHTTPBool ghttpPostAddFileFromMemoryW
(
	GHTTPPost post,
	const unsigned short * name,
	const char * buffer,
	int bufferLen,
	const unsigned short * reportFilename,
	const unsigned short * contentType
)
{
	char name_A[1024] = { '\0' };
	char reportFilename_A[1024] = { '\0' };
	char contentType_A[1024] = { '\0' };
	if (name != NULL)
		UCS2ToAsciiString(name, name_A);
	if (reportFilename != NULL)
		UCS2ToAsciiString(reportFilename, reportFilename_A);
	if (contentType != NULL)
		UCS2ToAsciiString(contentType, contentType_A);

	
	return ghttpPostAddFileFromMemoryA(post, name_A, buffer, bufferLen, reportFilename_A, contentType_A);
	
	GSI_UNUSED(reportFilename);
	GSI_UNUSED(contentType);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:26,代码来源:ghttpMain.c


示例3: gpiPeerPingReplyCallback

void gpiPeerPingReplyCallback(unsigned int ip, unsigned short port, unsigned int latency, void *userData)
{
	GSI_UNUSED(userData);
	GSI_UNUSED(latency);
	GSI_UNUSED(port);
	GSI_UNUSED(ip);
}
开发者ID:DevSlashNull,项目名称:GameSpy,代码行数:7,代码来源:gpiPeer.c


示例4: gpiPeerAcceptedCallback

void gpiPeerAcceptedCallback(unsigned int ip, unsigned short port, 
							 GSUdpErrorCode error, gsi_bool rejected, void *userData)
{
	GPConnection *connection = (GPConnection *)userData;
	GPIPeer *aPeer;
	IN_ADDR anAddr;
	anAddr.s_addr = ip;
	
	aPeer = gpiGetPeerByAddr(connection, ip, port);
	if (!aPeer)
	{
		gsDebugFormat(GSIDebugCat_GP, GSIDebugType_Network, GSIDebugLevel_HotError,
			"Peer does not exist: ip-port: %s:%d\n", inet_ntoa(anAddr), port);
	}
	else
	{
		if (rejected)
		{
			aPeer->state = GPI_PEER_DISCONNECTED;
			gsDebugFormat(GSIDebugCat_GP, GSIDebugType_Network, GSIDebugLevel_Notice,
				"Peer Connection rejected: ip-port: %s:%d\n", inet_ntoa(anAddr), port);
			return;
		}
	}
	
	gsDebugFormat(GSIDebugCat_GP, GSIDebugType_Network, GSIDebugLevel_Notice,
		"Peer Connection accepted: ip-port: %s:%d\n", inet_ntoa(anAddr), port);
	
	GSI_UNUSED(userData);
	GSI_UNUSED(rejected);
	GSI_UNUSED(error);
	GSI_UNUSED(anAddr);	
}
开发者ID:DevSlashNull,项目名称:GameSpy,代码行数:33,代码来源:gpiPeer.c


示例5: createSessionCallback

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// This will be triggered when scCreateSession() has completed.
//    Expected to occur once per reported game session.
void createSessionCallback(SCInterfacePtr theInterface,
						   GHTTPResult theHttpResult,
                           SCResult theResult,
						   void * theUserData)
{	
	gsDebugFormat(GSIDebugCat_App, GSIDebugType_Misc, GSIDebugLevel_Notice, 
		"CreateSessionCallback: theHttpResult = %d, theResult = %s\r\n", theHttpResult, SCResultStr[theResult]);

	
	if (theHttpResult == GHTTPSuccess && theResult == SCResult_NO_ERROR)
	{
		const char * sessionId    = scGetSessionId(theInterface);
		const char * connectionId = scGetConnectionId(theInterface);

		gsDebugFormat(GSIDebugCat_App, GSIDebugType_Misc, GSIDebugLevel_Debug, "Session ID: %s\r\n", sessionId);
		gsDebugFormat(GSIDebugCat_App, GSIDebugType_Misc, GSIDebugLevel_Debug, "Connection ID: %s\r\n", connectionId);
		GSI_UNUSED(sessionId);
		GSI_UNUSED(connectionId);
	}

	gServerData.mWaitCount--; // one less request to wait for

	GSI_UNUSED(theInterface);
	GSI_UNUSED(theUserData);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:29,代码来源:sctestmatchless.c


示例6: _tprintf

static void EnumPlayersCallback
(
	PEER peer,
	PEERBool success,
	RoomType roomType,
	int index,
	const gsi_char * nick,
	int flags,
	void * param
)
{
	if(!success)
	{
		_tprintf(_T("Enum %s players failed\n"), RtoS[roomType]);
		return;
	}

	if(index == -1)
	{
		_tprintf(_T("--------------------\n"));
		return;
	}

	_tprintf(_T("%d: %s\n"), index, nick);
	/*if(flags & PEER_FLAG_OP)
		_tprintf(_T(" (host)\n"));
	else
		_tprintf(_T("\n"));*/
		

	GSI_UNUSED(peer);
	GSI_UNUSED(param);
	GSI_UNUSED(flags);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:34,代码来源:peerc.c


示例7: GSI_UNUSED

// Used to list the players in the title room.
//////////////////////////////////////////////
static void EnumTitlePlayersCallback
(
	PEER peer,
	PEERBool success,
	RoomType roomType,
	int index,
	const char * nick,
	int flags,
	void * param
)
{
	if(!success)
	{
		Wizard->MessageBox("Error listing title-room players.");
		return;
	}

	if(index == -1)
		return;

	TitlePage->UpdatePlayerPing(nick, 9999);
	GSI_UNUSED(peer);
	GSI_UNUSED(flags);
	GSI_UNUSED(roomType);
	GSI_UNUSED(param);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:28,代码来源:TitlePage.cpp


示例8: _stprintf

static void QRServerKeyCallback
(
	PEER peer,
	int key,
	qr2_buffer_t buffer,
	void * param
)
{
#if VERBOSE
	gsi_char verbose[256];
	_stprintf(verbose, _T("QR_SERVER_KEY | %d\n"), key);
	OutputDebugString(verbose);
#endif

	switch(key)
	{
	case HOSTNAME_KEY:
		_tprintf(_T(" Server Key callback is being called for HOSTNAME_KEY\n"));
		qr2_buffer_add(buffer, _T("My Game"));
		break;
	case NUMPLAYERS_KEY:
		_tprintf(_T(" Server Key callback is being called for NUMPLAYERS_KEY\n"));
		qr2_buffer_add_int(buffer, 1);
		break;
	case GAMEMODE_KEY:
		_tprintf(_T(" Server Key callback is being called for GAMEMODE_KEY\n"));
		qr2_buffer_add(buffer, _T("openplaying"));
		break;
	case HOSTPORT_KEY:
		_tprintf(_T(" Server Key callback is being called for HOSTPORT_KEY\n"));
		qr2_buffer_add_int(buffer, 15151);
		break;
	case MAPNAME_KEY:
		_tprintf(_T(" Server Key callback is being called for MAPNAME_KEY\n"));
		qr2_buffer_add(buffer, _T("Big Crate Room"));
		break;
	case GAMETYPE_KEY:
		_tprintf(_T(" Server Key callback is being called for GAMETYPE_KEY\n"));
		qr2_buffer_add(buffer, _T("Friendly"));
		break;
	case TIMELIMIT_KEY:
		_tprintf(_T(" Server Key callback is being called for TIMELIMIT_KEY\n"));
		qr2_buffer_add_int(buffer, 100);
		break;
	case FRAGLIMIT_KEY:
		_tprintf(_T(" Server Key callback is being called for FRAGLIMIT_KEY\n"));
		qr2_buffer_add_int(buffer, 0);
		break;
	case TEAMPLAY_KEY:
		_tprintf(_T(" Server Key callback is being called for TEAMPLAY_KEY\n"));
		qr2_buffer_add_int(buffer, 0);
		break;
	default:
		qr2_buffer_add(buffer, _T(""));
		break;
	}
	
	GSI_UNUSED(peer);
	GSI_UNUSED(param);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:60,代码来源:peerc.c


示例9: piFindPlayerByIP

static void piPinged
(
	unsigned int IP,
	unsigned short port,
	int ping,
	const char * data,
	int len,
	PEER peer
)
{
	piPlayer * player;

	// Find the player.
	///////////////////
	player = piFindPlayerByIP(peer, IP);
	if(!player)
		return;

	// Process the ping.
	////////////////////
	piProcessPing(peer, player, ping);
	
	GSI_UNUSED(port);
	GSI_UNUSED(data);
	GSI_UNUSED(len);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:26,代码来源:peerPing.c


示例10: TableMap

static void piPingerReply
(
	unsigned int IP,
	unsigned short port,
	int ping,
	const char * pingData,
	int pingDataLen,
	PEER peer
)
{
	piPingerReplyData data;

	PEER_CONNECTION;

	// Find who sent the ping.
	//////////////////////////
	data.peer = peer;
	data.IP = IP;
	data.ping = ping;
	TableMap(connection->players, piPingerReplyMapFn, &data);
	
	GSI_UNUSED(port);
	GSI_UNUSED(pingData);
	GSI_UNUSED(pingDataLen);
	
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:26,代码来源:peerPing.c


示例11: _tsnprintf

static void NickErrorCallback
(
	PEER peer,
	int type,
	const gsi_char * badNick,
	int numSuggestedNicks,
	const gsi_char ** suggestedNicks,
	void * param
)
{
	static int errCount;

	if(errCount < 20)
	{
		_tsnprintf(nick,NICK_SIZE,_T("peerc%u"),(unsigned int)current_time());
		nick[NICK_SIZE - 1] = '\0';
		peerRetryWithNick(peer, nick);
	}
	else
	{
		//peerDisconnect(peer);
		peerRetryWithNick(peer, NULL);
	}
	errCount++;
	
	GSI_UNUSED(type);
	GSI_UNUSED(badNick);
	GSI_UNUSED(suggestedNicks);
	GSI_UNUSED(numSuggestedNicks);
	GSI_UNUSED(param);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:31,代码来源:peerc.c


示例12: GSI_UNUSED

static const unsigned short * piGetWatchKeyW
(
	const unsigned short * nick,
	const unsigned short * key,
	HashTable watchCache
)
{
#ifndef GSI_UNICODE
	GSI_UNUSED(nick);
	GSI_UNUSED(key);
	GSI_UNUSED(watchCache);
	return NULL; // can't use this function unless in GSI_UNICODE mode
#else
	piCacheKey keyTemp;
	piCacheKey * cacheKey;

	char* nick_A = UCS2ToUTF8StringAlloc(nick);
	char* key_A = UCS2ToUTF8StringAlloc(key);

	keyTemp.nick = (char *)nick_A;
	keyTemp.key = (char *)key_A;
	cacheKey = (piCacheKey *)TableLookup(watchCache, &keyTemp);

	gsifree(nick_A);
	gsifree(key_A);

	if (!cacheKey)
		return NULL;

	if(cacheKey->value_W)
		return cacheKey->value_W;
	return L"";
#endif
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:34,代码来源:peerKeys.c


示例13: GSI_UNUSED

static GHTTPBool CompletedCallback
(
	GHTTPRequest request,
	GHTTPResult result,
	char * buffer,
	GHTTPByteCount bufferLen,
	void * param
)
{
	CGhttpmfcDlg * dlg = (CGhttpmfcDlg *)param;

	static char * resultStrings[] =
	{
		"GHTTPSuccess",
		"GHTTPOutOfMemory",
		"GHTTPBufferOverflow",
		"GHTTPParseURLFailed",
		"GHTTPHostLookupFailed",
		"GHTTPSocketFailed",
		"GHTTPConnectFailed",
		"GHTTPBadResponse",
		"GHTTPRequestRejected",
		"GHTTPUnauthorized",
		"GHTTPForbidden",
		"GHTTPFileNotFound",
		"GHTTPServerError",
		"GHTTPFileWriteFailed",
		"GHTTPFileReadFailed",
		"GHTTPFileIncomplete",
		"GHTTPFileToBig",
		"GHTTPEncryptionError",
		"GHTTPRequestCancelled"
	};

	CString msg;

	if( GHTTPSuccess == result )
	{
		msg = "File received successfully";
	}
	else
	{
		msg.Format("Error: (%d) ", result);
		if( result < 0 || result >= sizeof(resultStrings)/sizeof(resultStrings[0]) )
			msg += "Unknown - local error table may be out of date";
		else
			msg += resultStrings[(int)result];
	}

	dlg->MessageBox(msg);

	dlg->m_request = -1;

	return GHTTPTrue;

	GSI_UNUSED(bufferLen);
	GSI_UNUSED(buffer);
	GSI_UNUSED(request);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:59,代码来源:ghttpmfcDlg.cpp


示例14: gsUdpConnAttemptCB

////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Requests for communication from a peer is handled by first checking if the 
// initial message has a message handler registered for it.  Otherwise 
// the message is passed onto the app.
void gsUdpConnAttemptCB(GT2Socket socket, GT2Connection connection, unsigned int ip, 
						unsigned short port, int latency, GT2Byte * message, int len)
{
	// Get the message handler for the connection 
	int index;
	GSUdpMsgHandler aHandler;
	GSUdpRemotePeer aRemotePeer;
	GSUdpEngineObject *aUdp = gsUdpEngineGetEngine();
	char anAddr[GS_IP_ADDR_AND_PORT];
	
	gsDebugFormat(GSIDebugCat_Common, GSIDebugType_Network, GSIDebugLevel_Comment, 
		"[Udp Engine] Connection attempt from %s\n", gt2AddressToString(ip, port, anAddr));
	//If there is a handler, automatically accept a connection if the initial message is
	//the same as the handler's registered initial message
	if (len >= GS_UDP_MSG_HEADER_LEN)
	{    
		memcpy(aHandler.mInitialMsg, message, GS_UDP_MSG_HEADER_LEN);
		
		aRemotePeer.mAddr = ip;
		aRemotePeer.mPort = port;
		aRemotePeer.mConnection = connection;
		
		ArrayAppend(aUdp->mRemotePeers, &aRemotePeer);
		index = ArraySearch(aUdp->mMsgHandlers, &aHandler, gsUdpMsgHandlerCompare, 0, 0);
		if (index != NOT_FOUND)
		{
			GT2ConnectionCallbacks aCallbacks;
			
			aCallbacks.closed = gsUdpClosedRoutingCB;
			aCallbacks.connected = gsUdpConnectedRoutingCB;
			aCallbacks.ping = gsUdpPingRoutingCB;
			aCallbacks.received = gsUdpReceivedRoutingCB;

	       
			// Automatically accept connections for Message Handlers
			gt2Accept(aRemotePeer.mConnection, &aCallbacks);	
			gsDebugFormat(GSIDebugCat_Common, GSIDebugType_Network, GSIDebugLevel_Comment, 
				"[Udp Engine] Connection attempt auto-accepted for message handler\n");
			return;
		}
	}
	// all other messages go to the app
	if (aUdp->mAppConnAttempt) 
	{
		gsDebugFormat(GSIDebugCat_Common, GSIDebugType_Network, GSIDebugLevel_Comment, 
			"[Udp Engine] Connection attempt from %s, asking app to accept/reject\n", gt2AddressToString(ip, port, anAddr));
		aUdp->mAppConnAttempt(ip, port, latency, (unsigned char *)message, (unsigned int)len, aUdp->mAppUserData);
	}
	else 
	{
		// Reject any un-handled connections or unknown connections
		gt2Reject(connection, NULL, 0);
		ArrayRemoveAt(aUdp->mRemotePeers, ArrayLength(aUdp->mRemotePeers) -1);
	}
	GSI_UNUSED(socket);
	GSI_UNUSED(anAddr);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:62,代码来源:gsUdpEngine.c


示例15: gviCustomCapturePacket

static GVBool gviCustomCapturePacket(GVDevice device, GVByte * packet, int * len, GVFrameStamp * frameStamp, GVScalar * volume)
{
	// not supported with custom devices
	assert(0);
	GSI_UNUSED(device);
	GSI_UNUSED(packet);
	GSI_UNUSED(len);
	GSI_UNUSED(frameStamp);
	GSI_UNUSED(volume);
	return GVFalse;
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:11,代码来源:gvCustomDevice.c


示例16: PersDataSaveCallback

static void PersDataSaveCallback(int localid, int profileid, persisttype_t type, int index, int success, time_t modified, void *instance)
{
	printf("Data save callback: localid: %d profileid: %d success: %d mod: %d\n", localid, profileid, success, (int)modified);
	/*********
	instance is a pointer to the callback counter, increment it
	**********/
	(*(int *)instance)++;
	
	GSI_UNUSED(type);
	GSI_UNUSED(index);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:11,代码来源:persisttest.c


示例17: PersDataCallback

static void PersDataCallback(int localid, int profileid, persisttype_t type, int index, int success, time_t modified, char *data, int len, void *instance)
{
	printf("Data get callback: localid: %d profileid: %d success: %d mod: %d len: %d data: %s\n",localid, profileid, success, (int)modified, len, data);
	/*********
	instance is a pointer to the callback counter, increment it
	**********/
	(*(int *)instance)++;
	
	GSI_UNUSED(type);
	GSI_UNUSED(index);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:11,代码来源:persisttest.c


示例18: submitReportCallback

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// This will be triggered when scSubmitReport() has completed
//    Expected to occur once per call to scSetReportIntention
void submitReportCallback(SCInterfacePtr theInterface, 
						  GHTTPResult theHttpResult,
						  SCResult theResult,
						  void * theUserData)
{
	gsDebugFormat(GSIDebugCat_App, GSIDebugType_Misc, GSIDebugLevel_Notice, 
		"SubmitReportCallback: theHttpResult = %d, theResult = %s\r\n", theHttpResult, SCResultStr[theResult]);
	
	gServerData.mWaitCount--; // one less request to wait for

	GSI_UNUSED(theHttpResult);
	GSI_UNUSED(theResult);
	GSI_UNUSED(theInterface);
	GSI_UNUSED(theUserData);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:19,代码来源:sctestmatchless.c


示例19: GSI_UNUSED

static void ConnectCallback
(
	PEER peer,
	PEERBool success,
	int failureReason,
	void * param
)
{
	connectSuccess = success;
	
	GSI_UNUSED(peer);
	GSI_UNUSED(success);
	GSI_UNUSED(failureReason);
	GSI_UNUSED(param);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:15,代码来源:peerc.c


示例20: sciReportSetPlayerAuthInfo

SCResult SC_CALL sciReportSetPlayerAuthInfo(SCIReport * theReport, gsi_u32 thePlayerIndex, const GSLoginCertificate * theCertificate, const gsi_u8 theAuthHash[16])
{
	SCIReportHeader * aHeader = (SCIReportHeader*)theReport->mBuffer.mData;
	gsi_u32 authDataOffset = 0;

	// Auth section is just after the roster
	authDataOffset = sizeof(SCIReportHeader) + aHeader->mRosterSectionLength;
	authDataOffset += SC_REPORT_AUTHDATA_LENGTH * thePlayerIndex;

	// copy auth data into the buffer
	// &theReport->mBuffer.mData[authDataOffset]
	GSI_UNUSED(theAuthHash);
	GSI_UNUSED(theCertificate);
	return SCResult_NO_ERROR;
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:15,代码来源:sciReport.c



注:本文中的GSI_UNUSED函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GSL_ERROR_NULL函数代码示例发布时间:2022-05-30
下一篇:
C++ GSIZE_TO_POINTER函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap