您好,欢迎光临本网站![请登录][注册会员]  
文件名称: VoIP Demo源码演示
  所属分类: C
  开发工具:
  文件大小: 227kb
  下载次数: 0
  上传时间: 2009-11-07
  提 供 者: ne***
 详细说明: VoIPDemo is intended as a sample to show how to use the RTC API for Windows CE, but also as a working application for demonstration and use (taking note of the limitations described below). Limitiations ============= Currently supports 1 IM and/or 1 voice call at a time. 1 Voice call limitation due to RTC spec. 1 IM call simplifies event handling + need for multiple session windows Simultaneous voice and IM calls are only allowed from one source, currently identified by SIP URI. Callback functionality is currently not implemented. Component Requirements ====================== SYSGEN_VOIP will bring in all the components required by VoIPDemo. The target device needs to have audio capture and play capabilities and a network interface. Overview of program flow and source ==================================== VoIPDemo is separated into three main functional parts: User Interface, use of the RTC API (including RTC event handling), and the code to interface between RTC and the UI. The intent of this quasi- layering approach is to limit the direct hooks from the RTC backend to the UI and make it easier to re-use the RTC code in a different UI. The program goes through the following phases: Window Initialization RTC Initialization Main Message Loop RTC Termination Window Termination The main message loop manages all main window UI related messages and events. This includes contact list changes by the user, UI for call placement, etc. When the main window finishes its setup of an outgoing call, it calls the SessionWindow Callback to actually initiate the call. The SessionWindow is where all voice and IM session UI takes place. It is called directly by our RTC event handler to display call/IM status information, notify the user of incoming calls/messages, parse user input for outgoing messages, and calls the interface code to initiate outgoing sessions. Our event handler for RTC interfaces call into the main application window through use of callbacks to the session window and signals presence change notifications directly to the listview objects (through the listview functions). Voice Call flow (from main window with call accepted) ====================================================== Note: Only showing participant and session state change events. 1. MainWndProc - User selects to make a call to a buddy / SIP URI 2. MainWndProc - Does some error checking, URI formatting if nessary, calls SessionWindowCallback 3. SessionWindowCallback - Initializes sesion window, more error checking, calls SessionTo 4. SessionTo - Creates a CSession wrapper for the session, calls the CSession::OpenVoiceSession 5. CSession::OpenVoiceSession - extensive error checking, makes API calls CreateSession(), AddParticipant() 6. RTC Event: SessionStateChange(INPROGRESS) - AddParticipant activates the session and places the call 7. RTC Event: ParticipantStateChange(INPROGRESS) - .. ( other participant (computer assumed) ) a. RTC Event: SessionStateChange(INCOMING) - error checking, sets up session related info, play ring to notify user of incoming session b. RTC Event: ParticipantStateChange(INCOMING) - more error checking, call SessionWindowCallBack with incoming user info (this path will wait for callback to return) c. SessionWindowCallBack - ask user to accept / deny incoming call (user accepts call) d. SessionWindowCallBack - brings up session window (if not exist), return ACCEPTED to event handler e. RTC Event: ParticipantStateChange(INCOMING) - call CSession::Accept() f. CSession::Accept() - error checking, makes API call Answer() g. RTC Event::SessionStateChange(ANSWERING) - stop the ringing h. RTC Event::ParticipantStateChange(ANSWERING) - no op. (Both parties) Note: at this point the call will be active so sound will be coming over the wire 8, g. RTC Event::SessionStateChange(CONNECTED) - no op 9, h. RTC Event::ParticipantStateChange(CONNECTED) - notify SessionWindowCallBack of connected user 10, i. SessionWindowCallBack - Notify user of accepted participant via text display User Information for use with profiles ====================================== The user's name, URI, and local phone are stored in the registry under HKEY_CURRENT_USER\Software\Microsoft\VoipDemo User Data User Profile List of Files w/ explanation ============================= Readme.txt - This File Common include files / data structures -------------------------------------- DBase.cpp - Methods and functions to store buddy,presence, and my information into the CE DB DBase.h - .. ht.h - simple templated hash table, low load (best when < 10 objects), currently used only in Session.cpp rtcs.h - Internal types, function prototypes, macros, defines, and includes used in both the RTC and the UI portions of the code StdAfx.cpp - Pre-compiled headers StdAfx.h - . vdtypes.cpp - Definitions of class functions for internal types, specifically PARTICIPANT_INFO, LOCAL_USER_INFO, and BUDDY_TYPE Interface between RTC backend and UI -------------------------------------- rtcs.cpp - Code to interface between the RTC API and the user interface. Code for RTC initialization / shutdown, sessions, buddies, and presence. rtcs.h - See Common include files... UI code -------- VoIPDemo.cpp - Main program instance. The main window procedure, app initialization / shutdown, main window child dialog procs, and listview code VoIPDemo.h - .. SessionWnd.cpp - Procs for the session window (UI / manager of IM/Voice sessions), including the sessionwindow callback function. SessionWnd.h - .. splashscr.cpp - Splashscreen to notify user that VoIPDemo.exe is starting splashscr.h - .. RTC backend code ----------------- rtcevent.cpp - RTC Event handler rtcInternal.h - RTC scope globals, defines, macros, and function declarations rtcsetup.cpp - Add IIDs for the RTC COM interfaces into the Registry rtcsetup.h - .. Session.cpp - RTC Session wrapper class. Keeps session-related code in one place Session.h - .. SessionContainer.cpp - Container class for our Session wrapper. Allows identifying a session wrapper by an RTC handle, makes use of ht.h SessionContainer.h - .. Resource / UI definitions files --------------------------------- newres.h - resource defines resource.h - .. VoIPDemo.rc - Describes dialog boxes, bitmaps, and other resources used in the program UI MIDL file for RTC COM object interfacing ----------------------------------------- rtccallp.idl - .. MIDL generated source ---------------------- dlldata.c - .. rtccallp.h - .. rtccallp_i.c - .. rtccallp_p.c - .. rtccall.h - describes the RTC types as generated from rtccallp.idl ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: VoIP
 输入关键字,在本站1000多万海量源码库中尽情搜索: