From 90c9b9e9c5cd9be3a620bf5e1d5b5d233573548c Mon Sep 17 00:00:00 2001 From: paul_productengine Date: Fri, 11 Feb 2011 13:49:10 +0200 Subject: STORM-680 FIXED (Avaline callers are added to the Recent list) - When accepting an avaline call, add a caller to the recent list as AvalineListItem - When adding item to the LLRecentPeople, check whether item with the same phone number exists and delete it if exists. This is need to avoid duplication in the Recent list of the panel People. --- indra/newview/llrecentpeople.h | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'indra/newview/llrecentpeople.h') diff --git a/indra/newview/llrecentpeople.h b/indra/newview/llrecentpeople.h index 852a92ff80..d0d6376867 100644 --- a/indra/newview/llrecentpeople.h +++ b/indra/newview/llrecentpeople.h @@ -58,9 +58,15 @@ public: * Add specified avatar to the list if it's not there already. * * @param id avatar to add. + * + * @param userdata additional information about last interaction party. + * For example when last interaction party is not an avatar + * but an avaline caller, additional info (such as phone + * number, session id and etc.) should be added. + * * @return false if the avatar is in the list already, true otherwise */ - bool add(const LLUUID& id); + bool add(const LLUUID& id, const LLSD& userdata = LLSD().with("date", LLDate::now())); /** * @param id avatar to search. @@ -75,7 +81,25 @@ public: */ void get(uuid_vec_t& result) const; - const LLDate& getDate(const LLUUID& id) const; + /** + * Returns last interaction time with specified participant + * + */ + const LLDate getDate(const LLUUID& id) const; + + /** + * Returns data about specified participant + * + * @param id identifier of specific participant + */ + const LLSD& getData(const LLUUID& id) const; + + /** + * Checks whether specific participant is an avaline caller + * + * @param id identifier of specific participant + */ + bool isAvalineCaller(const LLUUID& id) const; /** * Set callback to be called when the list changed. @@ -92,7 +116,10 @@ public: /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); private: - typedef std::map recent_people_t; + + const LLUUID& getIDByPhoneNumber(const LLSD& userdata); + + typedef std::map recent_people_t; recent_people_t mPeople; signal_t mChangedSignal; }; -- cgit v1.2.3