PageRenderTime 129ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 1ms

/indra/newview/llspeakingindicatormanager.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 83 lines | 21 code | 8 blank | 54 comment | 0 complexity | f2512b85b5c2e1c0023cbd51b5ae5f21 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llspeakingindicatormanager.h
  3. * @author Mike Antipov
  4. * @brief Interfeace of LLSpeackerIndicator class to be processed depend on avatars are in the same voice channel.
  5. * Also register/unregister methods for this class are declared
  6. *
  7. * $LicenseInfo:firstyear=2010&license=viewerlgpl$
  8. * Second Life Viewer Source Code
  9. * Copyright (C) 2010, Linden Research, Inc.
  10. *
  11. * This library is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU Lesser General Public
  13. * License as published by the Free Software Foundation;
  14. * version 2.1 of the License only.
  15. *
  16. * This library is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * Lesser General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Lesser General Public
  22. * License along with this library; if not, write to the Free Software
  23. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  24. *
  25. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  26. * $/LicenseInfo$
  27. */
  28. #ifndef LL_LLSPEAKINGINDICATORMANAGER_H
  29. #define LL_LLSPEAKINGINDICATORMANAGER_H
  30. class SpeakingIndicatorManager;
  31. class LLSpeakingIndicator
  32. {
  33. public:
  34. virtual ~LLSpeakingIndicator(){}
  35. virtual void switchIndicator(bool switch_on) = 0;
  36. private:
  37. friend class SpeakingIndicatorManager;
  38. // Accessors for target voice session UUID.
  39. // They are intended to be used only from SpeakingIndicatorManager to ensure target session is
  40. // the same indicator was registered with.
  41. void setTargetSessionID(const LLUUID& session_id) { mTargetSessionID = session_id; }
  42. const LLUUID& getTargetSessionID() { return mTargetSessionID; }
  43. /**
  44. * session UUID for which indicator should be shown only.
  45. * If it is set, registered indicator will be shown only in voice channel
  46. * which has the same session id (EXT-5562).
  47. */
  48. LLUUID mTargetSessionID;
  49. };
  50. // See EXT-3976.
  51. namespace LLSpeakingIndicatorManager
  52. {
  53. /**
  54. * Stores passed speaking indicator to control its visibility.
  55. *
  56. * Registered indicator is set visible if an appropriate avatar is in the same voice channel with Agent.
  57. * It ignores instances of Agent's indicator.
  58. *
  59. * @param speaker_id LLUUID of an avatar whose speaker indicator is registered.
  60. * @param speaking_indicator instance of the speaker indicator to be registered.
  61. * @param session_id session UUID for which indicator should be shown only.
  62. * If this parameter is set registered indicator will be shown only in voice channel
  63. * which has the same session id (EXT-5562).
  64. */
  65. void registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator,
  66. const LLUUID& session_id);
  67. /**
  68. * Removes passed speaking indicator from observing.
  69. *
  70. * @param speaker_id LLUUID of an avatar whose speaker indicator should be unregistered.
  71. * @param speaking_indicator instance of the speaker indicator to be unregistered.
  72. */
  73. void unregisterSpeakingIndicator(const LLUUID& speaker_id, const LLSpeakingIndicator* const speaking_indicator);
  74. }
  75. #endif // LL_LLSPEAKINGINDICATORMANAGER_H