corrade-vassal – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 1 /*
2 * Copyright (c) 2006-2014, openmetaverse.org
3 * All rights reserved.
4 *
5 * - Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * - Redistributions of source code must retain the above copyright notice, this
9 * list of conditions and the following disclaimer.
10 * - Neither the name of the openmetaverse.org nor the names
11 * of its contributors may be used to endorse or promote products derived from
12 * this software without specific prior written permission.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
18 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 * POSSIBILITY OF SUCH DAMAGE.
25 */
26  
27 using System;
28 using System.Collections.Generic;
29 using System.Text;
30  
31 namespace OpenMetaverse.Voice
32 {
33 public partial class VoiceGateway
34 {
35 /// <summary>
36 /// This is used to login a specific user account(s). It may only be called after
37 /// Connector initialization has completed successfully
38 /// </summary>
39 /// <param name="ConnectorHandle">Handle returned from successful Connector ‘create’ request</param>
40 /// <param name="AccountName">User's account name</param>
41 /// <param name="AccountPassword">User's account password</param>
42 /// <param name="AudioSessionAnswerMode">Values may be “AutoAnswer” or “VerifyAnswer”</param>
43 /// <param name="AccountURI">""</param>
44 /// <param name="ParticipantPropertyFrequency">This is an integer that specifies how often
45 /// the daemon will send participant property events while in a channel. If this is not set
46 /// the default will be “on state change”, which means that the events will be sent when
47 /// the participant starts talking, stops talking, is muted, is unmuted.
48 /// The valid values are:
49 /// 0 – Never
50 /// 5 – 10 times per second
51 /// 10 – 5 times per second
52 /// 50 – 1 time per second
53 /// 100 – on participant state change (this is the default)</param>
54 /// <param name="EnableBuddiesAndPresence">false</param>
55 /// <returns></returns>
56 public int AccountLogin(string ConnectorHandle, string AccountName, string AccountPassword, string AudioSessionAnswerMode, string AccountURI, int ParticipantPropertyFrequency, bool EnableBuddiesAndPresence)
57 {
58 StringBuilder sb = new StringBuilder();
59 sb.Append(VoiceGateway.MakeXML("ConnectorHandle", ConnectorHandle));
60 sb.Append(VoiceGateway.MakeXML("AccountName", AccountName));
61 sb.Append(VoiceGateway.MakeXML("AccountPassword", AccountPassword));
62 sb.Append(VoiceGateway.MakeXML("AudioSessionAnswerMode", AudioSessionAnswerMode));
63 sb.Append(VoiceGateway.MakeXML("AccountURI", AccountURI));
64 sb.Append(VoiceGateway.MakeXML("ParticipantPropertyFrequency", ParticipantPropertyFrequency.ToString()));
65 sb.Append(VoiceGateway.MakeXML("EnableBuddiesAndPresence", EnableBuddiesAndPresence ? "true" : "false"));
66 sb.Append(VoiceGateway.MakeXML("BuddyManagementMode", "Application"));
67 return Request("Account.Login.1", sb.ToString());
68 }
69  
70 /// <summary>
71 /// This is used to logout a user session. It should only be called with a valid AccountHandle.
72 /// </summary>
73 /// <param name="AccountHandle">Handle returned from successful Connector ‘login’ request</param>
74 /// <returns></returns>
75 public int AccountLogout(string AccountHandle)
76 {
77 string RequestXML = VoiceGateway.MakeXML("AccountHandle", AccountHandle);
78 return Request("Account.Logout.1", RequestXML);
79 }
80 }
81 }