diff options
Diffstat (limited to 'indra/llplugin')
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 12 | ||||
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.h | 6 | 
2 files changed, 15 insertions, 3 deletions
| diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 680017204c..e6a9787da9 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -792,15 +792,22 @@ F64 LLPluginClassMedia::getCPUUsage()  	return result;  } -void LLPluginClassMedia::sendPickFileResponse(const std::string &file) +void LLPluginClassMedia::sendPickFileResponse(const std::vector<std::string> files)  {  	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file_response"); -	message.setValue("file", file);  	if(mPlugin && mPlugin->isBlocked())  	{  		// If the plugin sent a blocking pick-file request, the response should unblock it.  		message.setValueBoolean("blocking_response", true);  	} + +	LLSD file_list = LLSD::emptyArray(); +	for (std::vector<std::string>::const_iterator in_iter = files.begin(); in_iter != files.end(); ++in_iter) +	{ +		file_list.append(LLSD::String(*in_iter)); +	} +	message.setValueLLSD("file_list", file_list); +  	sendMessage(message);  } @@ -1090,6 +1097,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)  		}  		else if(message_name == "pick_file")  		{ +			mIsMultipleFilePick = message.getValueBoolean("multiple_files");  			mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PICK_FILE_REQUEST);  		}  		else if(message_name == "auth_request") diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 3b0739d044..98c48cd987 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -176,7 +176,7 @@ public:  	F64 getCPUUsage(); -	void sendPickFileResponse(const std::string &file); +	void sendPickFileResponse(const std::vector<std::string> files);  	void sendAuthResponse(bool ok, const std::string &username, const std::string &password); @@ -277,6 +277,9 @@ public:  	std::string	getAuthURL() const { return mAuthURL; };  	std::string	getAuthRealm() const { return mAuthRealm; }; +	// These are valid during MEDIA_EVENT_PICK_FILE_REQUEST +	bool getIsMultipleFilePick() const { return mIsMultipleFilePick; } +  	// These are valid during MEDIA_EVENT_LINK_HOVERED  	std::string	getHoverText() const { return mHoverText; };  	std::string	getHoverLink() const { return mHoverLink; }; @@ -435,6 +438,7 @@ protected:  	std::string		mHoverText;  	std::string		mHoverLink;  	std::string     mFileDownloadFilename; +	bool			mIsMultipleFilePick;  	/////////////////////////////////////////  	// media_time class | 
