예제 #1
0
static gboolean execute_wakeup(char *uri){
	linphone_gtk_show_main_window();
	if (strlen(uri)>0)
	{
		//linphone_gtk_refer_received(linphone_gtk_get_core(),uri);
		char	szTemp[1024];
		char 	*pszAuPkgFile = NULL;
		char 	*pszSelectMedia = NULL;
		int		enabled_video = -1;
		
		strcpy(szTemp, uri);
		// uri 에서 uri 와 aupkg_file를 구분해야 한다.
		char *pszUri = strtok(szTemp, " \t\r\n");
		if(pszUri != NULL)
		{
			pszAuPkgFile = strtok(NULL, " \t\r\n");
			if(pszAuPkgFile != NULL)
			{
				strcpy(aupkg_file, pszAuPkgFile);
				pszSelectMedia = strtok(NULL, " \t\r\n");
				if(pszSelectMedia != NULL)
				{
					if(strcasecmp(pszSelectMedia, "audio") == 0)
					{
						enabled_video = FALSE;
					}
					else if(strcasecmp(pszSelectMedia, "video") == 0)
					{
						enabled_video = TRUE;
					}
				}
			}
			
			ms_message("execute_wakeup(%s), Uri=[%s], aupkg_file=[%s], enabled_video=[%d]", uri, pszUri, pszAuPkgFile, enabled_video);
			
			linphone_gtk_refer_received(linphone_gtk_get_core(), pszUri);
			if(enabled_video >= 0)
			{
				//LinphoneVideoPolicy policy = {0};
				//policy.automatically_initiate = policy.automatically_accept = (bool_t)enabled_video;
				//linphone_core_set_video_policy(linphone_gtk_get_core(), &policy);
				g_enable_video = (bool_t)enabled_video;
				linphone_gtk_set_menu_items(g_enable_video);
			}
		}
	}
	g_free(uri);
	return FALSE;
}
예제 #2
0
static gboolean execute_wakeup(char *buf){
	char uri[255]={0};
	int option;

	if (strlen(buf)>1) sscanf(buf,"%i%s",&option,uri);
	else sscanf(buf,"%i",&option);

	switch(option){
		case START_LINPHONE:
			linphone_gtk_show_main_window();
			break;
		case START_AUDIO_ASSISTANT:
			linphone_gtk_show_audio_assistant();
			break;
		case START_LINPHONE_WITH_CALL:
			linphone_gtk_refer_received(linphone_gtk_get_core(),uri);
			break;
	};

	g_free(buf);
	return FALSE;
}