// virtual BOOL FSFloaterVoiceControls::postBuild() { mAvatarList = getChild<LLAvatarList>("speakers_list"); mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&FSFloaterVoiceControls::onAvatarListRefreshed, this)); childSetAction("leave_call_btn", boost::bind(&FSFloaterVoiceControls::leaveCall, this)); mNonAvatarCaller = findChild<LLNonAvatarCaller>("non_avatar_caller"); mNonAvatarCaller->setVisible(FALSE); mVolumeSlider = findChild<LLSliderCtrl>("volume_slider"); mMuteButton = findChild<LLButton>("mute_btn"); if (mVolumeSlider && mMuteButton) { mAvatarList->setCommitCallback(boost::bind(&FSFloaterVoiceControls::onParticipantSelected, this)); mVolumeSlider->setCommitCallback(boost::bind(&FSFloaterVoiceControls::onVolumeChanged, this)); mMuteButton->setCommitCallback(boost::bind(&FSFloaterVoiceControls::onMuteChanged, this)); } initAgentData(); connectToChannel(LLVoiceChannel::getCurrentVoiceChannel()); updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) updateSession(); return TRUE; }
// virtual BOOL LLCallFloater::postBuild() { LLTransientDockableFloater::postBuild(); mAvatarList = getChild<LLAvatarList>("speakers_list"); mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLCallFloater::onAvatarListRefreshed, this)); childSetAction("leave_call_btn", boost::bind(&LLCallFloater::leaveCall, this)); mNonAvatarCaller = findChild<LLNonAvatarCaller>("non_avatar_caller"); mNonAvatarCaller->setVisible(FALSE); LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_flyout_btn"); setDockControl(new LLDockControl( anchor_panel, this, getDockTongue(), LLDockControl::TOP)); initAgentData(); connectToChannel(LLVoiceChannel::getCurrentVoiceChannel()); setIsChrome(true); //chrome="true" hides floater caption if (mDragHandle) mDragHandle->setTitleVisible(TRUE); updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) updateSession(); return TRUE; }
void QDSActionPrivate::emitRequest() { connectToChannel(); startTimer(); QtopiaServiceRequest serviceRequest( mServiceInfo.serviceId(), mServiceInfo.name() + "(QDSActionRequest)" ); // No tr serviceRequest << QDSActionRequest( mServiceInfo, responseChannel() ); serviceRequest.send(); }
void QDSActionPrivate::emitRequest( const QDSData& requestData, const QByteArray& auxiliary ) { connectToChannel(); startTimer(); QtopiaServiceRequest serviceRequest( mServiceInfo.serviceId(), mServiceInfo.name() + "(QDSActionRequest)" ); // No tr serviceRequest << QDSActionRequest( mServiceInfo, requestData, responseChannel(), auxiliary ); serviceRequest.send(); }
// virtual BOOL LLCallFloater::postBuild() { mAvatarList = getChild<LLAvatarList>("speakers_list"); mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLCallFloater::onAvatarListRefreshed, this)); childSetAction("leave_call_btn", boost::bind(&LLCallFloater::leaveCall, this)); mNonAvatarCaller = findChild<LLNonAvatarCaller>("non_avatar_caller"); mNonAvatarCaller->setVisible(FALSE); initAgentData(); connectToChannel(LLVoiceChannel::getCurrentVoiceChannel()); updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) updateSession(); return TRUE; }
int main(void) { char buff[100]; channel = (void *)malloc(200); /*---Establezco los canales de comunicacion---*/ getDefaultChannel(channel); if ( connectToChannel(channel,CLIENT) < 0 ) { printf("Server not available\n"); return 0; } itoa(buff,GET_CHANNEL); sendPacket(buff,strlen(buff)+1, channel, CLIENT); receivePacket(buff,MAX_SIZE, channel, CLIENT); disconnectFromChannel(channel); stringToChannel(buff, channel); connectToChannel(channel,CLIENT); /*---Abro el pipe de sincronismo entre padre e hijo---*/ if( pipe(syncPipe) == -1 ){ printf("Error al crear el pipe de sincronismo en el client.\n"); return 0; } /*---Abro el pipe de pasaje de argumentos para seniales---*/ if( pipe(signalPipe) == -1 ){ printf("Error al crear el pipe de args para seniales.\n"); return 0; } /*---Seteo el semaforo---*/ int semkey = getpid(); semun x; x.val = 1; int flags = IPC_CREAT | IPC_EXCL; if ( ( semid = semget(semkey, 1, 0666 | flags )) == -1 ) { printf("Error al crear semaforo: %d\n", semkey); return -1; } if ( semctl(semid, 0, SETVAL, x) == -1 ) { printf("Error al configurar semaforo\n"); return -1; } /*---Configuracion de manejo de seniales---*/ /* SIGUSR1 -> SHELL_SIGNAL */ /* SIGUSR2 -> DRAFT_SIGNAL */ struct sigaction draftSigAct; draftSigAct.sa_handler = draftSignalHandler; sigemptyset(&(draftSigAct.sa_mask)); draftSigAct.sa_flags = SA_NODEFER; struct sigaction shellSigAct; shellSigAct.sa_handler = shellSignalHandler; sigemptyset(&(shellSigAct.sa_mask)); shellSigAct.sa_flags = SA_NODEFER; sigaction( SIGUSR1, &shellSigAct, NULL); sigaction( SIGUSR2, &draftSigAct, NULL); static struct sigaction act3; act3.sa_handler = catchSigPipe; sigfillset(&(act3.sa_mask)); sigaction(SIGPIPE, &act3, NULL); static struct sigaction act1; static struct sigaction act2; /*Convenimos a este proceso como programa de envio de datos*/ senderPid = getpid(); pid_t auxPid; switch( auxPid = fork() ) { case -1: printf("Error al configurar el cliente.\n"); break; case 0: receiverPid = getpid(); close(syncPipe[0]); close(signalPipe[0]); receive(); break; default: act1.sa_handler = shutDown; sigfillset(&(act1.sa_mask)); sigaction(SIGINT, &act1, NULL); act2.sa_handler = shutDown; sigfillset(&(act2.sa_mask)); sigaction(SIGTSTP, &act2, NULL); receiverPid = auxPid; close(signalPipe[1]); close(syncPipe[1]); raise(SIGUSR1);break; } return 0; }