⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtcinternal.h

📁 Windows CE .Net 下面 VOIP编程的经典实例。对于初学Windows 平台下VOIP编程技术的程序员颇具借鉴意义!
💻 H
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*************************************************************************


  Disclaimer:

    This code and information is provided "as is" without warranty of
    any kind, either expressed or implied, including but not limited to
    the implied warranties of merchantability and/or fitness for a
    particular purpose.

Module Name:

	rtcinternal.h

Abstract:

    defines, globals, and functions internal to RTCS

Notes:		

**************************************************************************/

#ifndef _RTCINTERNAL_H_
#define _RTCINTERNAL_H_
	
#include <windows.h>
#include <rtccore.h>
#include "rtcevent.h"
#include "rtcsetup.h"
#include "rtcs.h"

// place this here as it is needed by Session*.h
typedef int (*SWCB_FN_PTR) (SESSIONWNDCALLBACKMSGS, void*, HANDLE);

#include "SessionContainer.h"
#include "Session.h"

/************************************************************************************************

	#defines 

 ************************************************************************************************/

// time to wait for 
#define EXITING_WAIT_TIME   5000   // ~10 seconds

#ifndef END_VAL
#define END_VAL 0xffffffff
#endif

// for communication from SWCB on incoming call
#define SWCB_CALL_REJECTED	0
#define SWCB_CALL_ACCEPTED	1
#define SWCB_CALL_TIMEOUT	2

/************************************************************************************************

  Structures / typedefs
 
 ************************************************************************************************/

#define DEFAULT_PRESENCE_STORAGE L"\\windows\\presence.xml"
#define DEFAULT_XML_PROFILE \
	L"<provision key=\"mysipserverkey\" name=\"SIP_PROVISIONING\">"\
	L"<user uri=\"sip:george@company.com\" account=\"george\" name=\"george\"/>"\
	L"<sipsrv addr=\"mysipservername\" protocol=\"udp\" auth=\"digest\" role=\"registrar\"/>"\
	L"<sipsrv addr=\"mysipservername\" protocol=\"udp\" auth=\"digest\" role=\"proxy\">"\
	L"  <session party=\"first\" type=\"pc2pc\"/>"\
	L"  <session party=\"first\" type=\"pc2ph\"/>"\
	L"  <session party=\"first\" type=\"im\"/>"\
	L"</sipsrv>"\
	L"</provision>"

#define PHONE_TO_PHONE_XML_PROFILE \
	L""
// insert the phone to phone profile here

//	L"<client name=\"John Bubbleneck\" updateuri=\"http://winrtc/deploy\">"\
//	L"      <data> My test of RTC</data>"\
//	L"</client>"\
	

/************************************************************************************************
 
   Global Variables

 ************************************************************************************************/

// RTC client interface
EXTERN ( IRTCClient * g_pRTCClient, NULL );

// RTC Presence
EXTERN ( IRTCClientPresence* g_pRTCPresence, NULL );

// RTC Client Profile
EXTERN ( IRTCProfile* g_pRTCProfile, NULL );
EXTERN ( IRTCClientProvisioning* g_pRTCProvision, NULL );

// Callback function pointer for session related events
EXTERN ( SWCB_FN_PTR g_fnSWCB, NULL );

// RTC event interface
EXTERN ( CRTCEvents* g_pRTCEvents, NULL );

// State to ensure we don't attempt more than a single voice or IM session at a time
EXTERN ( CRITICAL_SECTION* g_pcsSessionDataLock, NULL );
EXTERN ( BOOL g_bVoiceSessionOpen, FALSE );
EXTERN ( BOOL g_bIMSessionOpen, FALSE );

	// Name of current participant.  This helps ensure we're only talking to 1 person at a time
	// saves trouble of different people on Voice or IM sessions
EXTERN ( BSTR g_bstrCurrentlyConnectedURI, NULL );

// Container for all session related information, accessed by session handle
EXTERN ( CSessionContainer* g_pSessionContainer, NULL );

/************************************************************************************************
 
   Function Prototypes
 
 ************************************************************************************************/

HRESULT EventNotification (
				   RTC_EVENT enEvent,
				   IDispatch * pUnk
				   );

void RegisterEventInterface();
void UnregisterEventInterface();

#endif _RTCINTERNAL_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -