Use SIP connect string as Mumble comment text
This commit is contained in:
		
							förälder
							
								
									9988d9f13c
								
							
						
					
					
						incheckning
						18cd3cde13
					
				| @ -168,3 +168,7 @@ void mumble::MumbleCommunicator::sendUserState(mumlib::UserState field, bool val | ||||
|     mum->sendUserState(field, val); | ||||
| } | ||||
| 
 | ||||
| void mumble::MumbleCommunicator::sendUserState(mumlib::UserState field, std::string val) { | ||||
|     mum->sendUserState(field, val); | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -82,6 +82,8 @@ namespace mumble { | ||||
| 
 | ||||
|         void sendUserState(mumlib::UserState field, bool val); | ||||
| 
 | ||||
|         void sendUserState(mumlib::UserState field, std::string val); | ||||
| 
 | ||||
|         MumbleUserState userState; | ||||
| 
 | ||||
|         int callId; | ||||
|  | ||||
| @ -154,6 +154,7 @@ namespace sip { | ||||
|             pj_thread_sleep(500); // sleep a moment to allow connection to stabilize
 | ||||
| 
 | ||||
|             communicator.logger.notice(msgText); | ||||
|             communicator.calls[ci.id].sendUserStateStr(mumlib::UserState::COMMENT, msgText); | ||||
|             communicator.calls[ci.id].onStateChange(msgText); | ||||
| 
 | ||||
|             pj_thread_sleep(500); // sleep a moment to allow connection to stabilize
 | ||||
| @ -193,6 +194,7 @@ namespace sip { | ||||
|                 communicator.calls[ci.id].mixer->clear(); | ||||
| 
 | ||||
|                 communicator.logger.notice(msgText); | ||||
|                 communicator.calls[ci.id].sendUserStateStr(mumlib::UserState::COMMENT, msgText); | ||||
|                 communicator.calls[ci.id].onStateChange(msgText); | ||||
|                 communicator.calls[ci.id].sendUserState(mumlib::UserState::SELF_DEAF, true); | ||||
|                 communicator.logger.notice("MYDEBUG: call joinDefaultChannel()"); | ||||
|  | ||||
| @ -76,6 +76,7 @@ namespace sip { | ||||
|         std::function<void(int16_t *, int)> onIncomingPcmSamples; | ||||
|         std::function<void(int)> onMuteDeafChange; | ||||
|         std::function<void(mumlib::UserState field, bool val)> sendUserState; | ||||
|         std::function<void(mumlib::UserState field, std::string val)> sendUserStateStr; | ||||
|         std::function<void()> onConnect; | ||||
|         std::function<void()> onDisconnect; | ||||
|         std::function<void()> onCallerAuth; | ||||
|  | ||||
							
								
								
									
										10
									
								
								main.cpp
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								main.cpp
									
									
									
									
									
								
							| @ -183,7 +183,15 @@ int main(int argc, char *argv[]) { | ||||
| 
 | ||||
|         // Send UserState to Mumble
 | ||||
|         pjsuaCommunicator.calls[i].sendUserState = std::bind( | ||||
|                 &mumble::MumbleCommunicator::sendUserState, | ||||
|                 static_cast<void(mumble::MumbleCommunicator::*)(mumlib::UserState, bool)> | ||||
|                 (&mumble::MumbleCommunicator::sendUserState), | ||||
|                 mumcom, | ||||
|                 _1, _2); | ||||
| 
 | ||||
|         // Send UserState to Mumble
 | ||||
|         pjsuaCommunicator.calls[i].sendUserStateStr = std::bind( | ||||
|                 static_cast<void(mumble::MumbleCommunicator::*)(mumlib::UserState, std::string)> | ||||
|                 (&mumble::MumbleCommunicator::sendUserState), | ||||
|                 mumcom, | ||||
|                 _1, _2); | ||||
| 
 | ||||
|  | ||||
		Laddar…
	
		Referens i nytt ärende
	
	Block a user
	 Scott Hardin
						Scott Hardin