Beispiel #1
0
 Participant::Participant(QString name, MumbleLib::User* user) :
     muted_(false),
     speaking_(false),
     position_known_(false),
     position_(0.0, 0.0, 0.0),
     user_(user),
     name_(name),
     voice_activity_(0)
 {
     connect(user_, SIGNAL(StartReceivingAudio()), SLOT(OnStartSpeaking()) );
     connect(user_, SIGNAL(StopReceivingAudio()), SLOT(OnStopSpeaking()) );
     connect(user_, SIGNAL(PositionUpdated()), SLOT(OnPositionUpdated()) );
     connect(user_, SIGNAL(Left()), SLOT(OnUserLeft()) );
     connect(user_, SIGNAL(destroyed()), SLOT(UserObjectDestroyed()));
 }
Beispiel #2
0
status_t BnChatSessionEvents::onTransact(
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
    	status_t result = 0x80000000;
	_TRACE("ChatSessionEvents::onTransact[pid:%d] >>:code 0x%x",GetCallerPID(),code); //data.print();
	
	switch(code) {
		case ICSE_OnNewUser: {
			CHECK_INTERFACE(IChatSessionEvents, data, reply);
			String16 name = data.readString16();
			OnNewUser(name);
			result = NO_ERROR;
		} break;		
		case ICSE_OnUserLeft: {
			CHECK_INTERFACE(IChatSessionEvents, data, reply);
			String16 name = data.readString16();
			OnUserLeft(name);
			result = NO_ERROR;
		} break;
		case ICSE_OnNewStatement: {
			CHECK_INTERFACE(IChatSessionEvents, data, reply);
			String16 name = data.readString16();
			String16 statement = data.readString16();		
			OnNewStatement(name,statement);
			result = NO_ERROR;
		} break;
		case ICSE_Sync_OnNewStatement: {
			CHECK_INTERFACE(IChatSessionEvents, data, reply);
			String16 name = data.readString16();
			String16 statement = data.readString16();		
			status_t err = Sync_OnNewStatement(name,statement);
			reply->writeInt32(err);
			result = NO_ERROR;
		} break;		
		case ICSE_GetUserName: {
			CHECK_INTERFACE(IChatSessionEvents, data, reply);
			String16 name = GetUserName();
			reply->writeString16(name);
			result = NO_ERROR;
		} break;		
		default:
			result = BBinder::onTransact(code, data, reply, flags);
	}
	
	_TRACE("ChatSessionEvents::onTransact[pid:%d] <<:result %d",GetCallerPID(),result); //reply.print();
	return result;	
}