Beispiel #1
0
void CMonitorWnd::OnMediaRecMask() 
{
	CRegistry pRegistry;
	DWORD nPayloadMask = pRegistry.GetInt( "Monitor", "RecMask" );
	
	pRegistry.SetInt( "Monitor", "RecMask", RecordPayload(nPayloadMask) ^ PayloadMask_Video );
}
Beispiel #2
0
void CMonitorWnd::Apply()
{
	CRegistry pRegistry;
	
	DWORD nPayloadMask = pRegistry.GetInt( "Monitor", "RecMask", RecordPayload(PayloadMask_Audio) );
	pRegistry.SetInt( "Monitor", "RecMask", nPayloadMask );
}
Beispiel #3
0
void CMonitorWnd::OnUpdateMediaRecMask(CCmdUI* pCmdUI)
{
	CRegistry pRegistry;
	DWORD nPayloadMask = pRegistry.GetInt( "Monitor", "RecMask" );
	
	pCmdUI->SetCheck( (RecordPayload(nPayloadMask) & PayloadMask_Video) == PayloadMask_Video );
}
Beispiel #4
0
void CMonitorWnd::SyncMirrorView()
{
	ASSERT( m_pDatagrams == NULL );
	DWORD nAddress = htonl( INADDR_ANY );
	
	CRegistry pRegistry;
	DWORD nPort = pRegistry.GetInt( "Monitor", "Port", 9962 );
	
	SOCKADDR_IN	pHost;
	CopyMemory( &pHost, &Network.m_pHost, sizeof(pHost) );
	
	CString xUserId( Network.m_xUserId ); xUserId += ".Monitor";
	
	m_pDatagrams = Datagrams.Attach( new CDatagrams(Payload_Alaw) );
	m_pDatagrams->Connect( (IN_ADDR*)&nAddress, (WORD)nPort );
	
	pHost.sin_port = htons( (WORD)Settings.Network.Port );
	m_pDatagrams->JoinMirror( &pHost, xUserId );
	
	CDatagrams*	pDatagrams = m_pDatagrams->Attach( new CDatagrams(Payload_H263) );
	pDatagrams->Connect( (IN_ADDR*)&nAddress, (WORD)nPort + 1 );
	
	pHost.sin_port = htons( (WORD)Settings.Network.Port + 1 );
	pDatagrams->JoinMirror( &pHost, xUserId );
	
	this->JoinMonitor();
}
Beispiel #5
0
void CMonitorWnd::OnMediaRecord()
{
	if ( ! m_wndChild.m_pSelected ) return;
	
	CNetworkThumb* pWindow = m_wndChild.m_pSelected;
	if ( pWindow->IsRecording() ) {pWindow->StopRecord(); return;}
	
	CRegistry pRegistry;
	DWORD nPayloadMask = pRegistry.GetInt( "Monitor", "RecMask" );
	
	CString strFile = pRegistry.GetString( "Monitor", "RecFile", "<USER>\\<DATE>\\<USER>.<DATE><TIME>.AVI" );
	pWindow->OnRecordFile( nPayloadMask, strFile );
}
Beispiel #6
0
int CPagerChannel::FeeLogin_init(EVTBLK *evtblk)
{
	int nChan = evtblk->nReference;
	if ( Reserved & 0x08 ) return 0;
	
	Reserved |= 0x08;	// 置状态“正在”
	
	CRegistry pRegistry;
	CString strHost = pRegistry.GetString( "Pager", "Master", "127.0.0.1" );
	int nPort = pRegistry.GetInt( "Pager", "Port", 9901 );
	
	ConnectTo( strHost, nPort );
	SetTimer( 60 * 1000 );
	
	return 0;
}
BOOL CPlaySettingsPage::LoadSettings()
{
	CString strValue;
	CRegistry pRegistry;
	
	strValue = FormatTimeString( pRegistry.GetInt( "Profit", "PlayRetry", 180 ) );
	m_wndRetry.SetCurSel( m_wndRetry.FindStringExact( -1, (LPCTSTR)strValue ) );
	
	if ( m_wndRetry.GetCurSel() == CB_ERR )
	{
		int nItem = m_wndRetry.AddString( strValue );
		m_wndRetry.SetCurSel( nItem );
	}
	
	return TRUE;
}
Beispiel #8
0
BOOL CMonitorWnd::OnSyncMirrorTalk(CXMLElement* pXML)
{
	CString xUserId = pXML->GetAttributeValue( "UserId" );
	
	CNetworkThumb* pWindow = m_wndChild.FindUser( xUserId );
	if ( ! pWindow ) return FALSE;
	
	if ( pXML->GetAttribute("bye") ) return SUCCEEDED(pWindow->StopRecord());
	CString xRemoteId = pXML->GetAttributeValue( "RemoteId" );
	
	CRegistry pRegistry;
	DWORD nPayloadMask = pRegistry.GetInt( "Monitor", "RecMask" );
	
	CString strFile = pRegistry.GetString( "Monitor", "RecFile", "<USER>\\<DATE>\\<TIME>-<REMOTE>.AVI" );
	
//	if ( pWindow ) pWindow->OnRecordFile( nPayloadMask, strFile, xRemoteId );
	return TRUE;
}
Beispiel #9
0
BOOL CCallerChannel::IsNotUserTime()
{
	CRegistry pRegistry;
	
	if ( ! pRegistry.GetInt( "Caller", "NoUser" ) ) return FALSE;
	
	CString strValue = pRegistry.GetString( "Caller", "UserTime" );
	
	CString str	= strValue.SpanExcluding( _T("-") );
	WORD nLTime = _ttoi( str );
	
	strValue	= strValue.Mid( str.GetLength() + 1 );
	WORD nHTime = _ttoi( strValue );
	
	CTime tNow = CTime::GetCurrentTime();
	WORD nNowTime = tNow.GetHour()* 100 + tNow.GetMinute();
	
	return nNowTime < nLTime || nNowTime > nHTime;
}