public GroupChatManager(QuickbloxClient quickbloxClient, string groupJid, string dialogId) { this.quickbloxClient = quickbloxClient; this.groupJid = groupJid; this.dialogId = dialogId; quickbloxClient.ChatXmppClient.MessageReceived += MessagesClientOnOnMessageReceived; }
public async Task TestInitialize() { this.client = new QuickbloxClient((int)GlobalConstant.ApplicationId, GlobalConstant.AuthorizationKey, GlobalConstant.AuthorizationSecret, GlobalConstant.ApiBaseEndPoint, GlobalConstant.ChatEndpoint, new HmacSha1CryptographicProvider()); var sessionResponse = await this.client.AuthenticationClient.CreateSessionBaseAsync(); client.Token = sessionResponse.Result.Session.Token; }
public async Task RetrieveUsersUnauthorizedTest() { QuickbloxClient client2 = new QuickbloxClient((int)ApplicationId, AuthorizationKey, AuthorizationSecret, GlobalConstant.ApiBaseEndPoint, GlobalConstant.ChatEndpoint); var response = await client2.UsersClient.RetrieveUsersAsync(); Assert.IsTrue(response.StatusCode == HttpStatusCode.Unauthorized); }
public async Task TestInitialize() { this.client = new QuickbloxClient((int)ApplicationId, AuthorizationKey, AuthorizationSecret, GlobalConstant.ApiBaseEndPoint, GlobalConstant.ChatEndpoint, logger: new DebugLogger()); var sessionResponse = await this.client.AuthenticationClient.CreateSessionBaseAsync(); client.Token = sessionResponse.Result.Session.Token; }
public async Task TestInitialize() { this.client = new QuickbloxClient((int)GlobalConstant.ApplicationId, GlobalConstant.AuthorizationKey, GlobalConstant.AuthorizationSecret, GlobalConstant.ApiBaseEndPoint, GlobalConstant.ChatEndpoint, logger: new FileLogger()); var sessionResponse = await this.client.AuthenticationClient.CreateSessionWithEmailAsync("*****@*****.**", "12345678"); client.Token = sessionResponse.Result.Session.Token; }
public async Task TestInitialize() { this.client = new QuickbloxClient(ApplicationId, AuthorizationKey, AuthorizationSecret, GlobalConstant.ApiBaseEndPoint, GlobalConstant.ChatEndpoint); var sessionResponse = await this.client.AuthenticationClient.CreateSessionWithLoginAsync(Login, Password); client.Token = sessionResponse.Result.Session.Token; }
public CallHelperProvider(QuickbloxClient client) { if (client == null) { throw new ArgumentNullException(nameof(client)); } chatXmppClient = client.ChatXmppClient; webSyncClient = client.WebSyncClient; chatXmppClient.MessageReceived += OnMessageReceived; webSyncClient.VideoChatMessage += OnVideoChatMessageReceived; #if WINDOWS_APP callOutgoingAudioTimer = new DispatcherTimer(); callOutgoingAudioTimer.Tick += OnCallOutgoingAudioTimer; callOutgoingAudioTimer.Interval = TimeSpan.FromMilliseconds(5000); callIncomingAudioTimer = new DispatcherTimer(); callIncomingAudioTimer.Tick += OnCallIncomingAudioTimer; callIncomingAudioTimer.Interval = TimeSpan.FromMilliseconds(5000); #else callOutgoingAudioTimer = new Timer(); callOutgoingAudioTimer.Elapsed += OnCallOutgoingAudioTimer; callOutgoingAudioTimer.Interval = 5000; callIncomingAudioTimer = new Timer(); callIncomingAudioTimer.Elapsed += OnCallIncomingAudioTimer; callIncomingAudioTimer.Interval = 5000; #endif }
internal PrivateChatManager(QuickbloxClient quickbloxClient, int otherUserId, string dialogId) { this.otherUserId = otherUserId; this.otherUserJid = ChatXmppClient.BuildJid(otherUserId, quickbloxClient.ApplicationId, quickbloxClient.ChatEndpoint); this.dialogId = dialogId; this.quickbloxClient = quickbloxClient; quickbloxClient.ChatXmppClient.MessageReceived += MessagesClientOnOnMessageReceived; }
public static async Task ClassInitialize(TestContext testContext) { client1 = new QuickbloxClient((int)GlobalConstant.ApplicationId, GlobalConstant.AuthorizationKey, GlobalConstant.AuthorizationSecret, GlobalConstant.ApiBaseEndPoint, GlobalConstant.ChatEndpoint); //await client1.InitializeClientAsync(GlobalConstant.ApiBaseEndPoint, GlobalConstant.AccountKey, new HmacSha1CryptographicProvider()); //await client1.AuthenticationClient.CreateSessionWithEmailAsync(GlobalConstant.ApplicationId, GlobalConstant.AuthorizationKey, GlobalConstant.AuthorizationSecret, email1, password1); #if DEBUG //client1.ChatXmppClient.DebugClientName = "1"; #endif await client1.ChatXmppClient.Connect(id1, password1); }
public async Task TestInitialize() { this.client = new QuickbloxClient((int)GlobalConstant.ApplicationId, GlobalConstant.AuthorizationKey, GlobalConstant.AuthorizationSecret, GlobalConstant.ApiBaseEndPoint, GlobalConstant.ChatEndpoint); var sessionResponse = await this.client.AuthenticationClient.CreateSessionWithLoginAsync("Test654321", "Test12345", deviceRequestRequest : new DeviceRequest() { Platform = Quickblox.Sdk.GeneralDataModel.Models.Platform.windows_phone, Udid = Helpers.GetHardwareId() }); client.Token = sessionResponse.Result.Session.Token; }
public async Task InitializeQBoxClient() { if (_quickbloxClient == null) { const int applicationId = 52677; const String authKey = "Hp9zVxgqNg-hbwV"; const String authSecret = "ee4vhYTVf5SBpTB"; const string ApiBaseEndpoint = "https://api.quickblox.com"; const string ChatEndpoint = "chat.quickblox.com"; const string ChatMucEndpoint = "muc." + ChatEndpoint; _quickbloxClient = new QuickbloxClient(applicationId, authKey, authSecret, ApiBaseEndpoint, ChatEndpoint); //if (reIntialize) //{ try { var sessionResponse = await _quickbloxClient.AuthenticationClient.CreateSessionBaseAsync(); Console.WriteLine(sessionResponse.StatusCode); } catch (Exception e) { Console.WriteLine(e); } // } // else{ // var sessionResponse = _quickbloxClient.AuthenticationClient.CreateSessionBaseAsync(); // Console.WriteLine(sessionResponse); //} //return sessionResponse.StatusCode; } //return (System.Net.HttpStatusCode)_quickbloxClient.AuthenticationClient.GetSessionAsync().Status; //else if (quickbloxClient.) //return quickbloxClient; }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { var fileLogger = new FileLogger(); var quickbloxClient = new QuickbloxClient(ApplicationKeys.ApplicationId, ApplicationKeys.AuthorizationKey, ApplicationKeys.AuthorizationSecret, ApplicationKeys.ApiBaseEndPoint, ApplicationKeys.ChatEndpoint, fileLogger); QmunicateLoggerHolder.LoggerInstance = fileLogger; var fileStorage = new FileStorage(); ServiceLocator.Locator.Bind<INavigationService, NavigationService>(LifetimeMode.Singleton); ServiceLocator.Locator.Bind<IQuickbloxClient, QuickbloxClient>(quickbloxClient); ServiceLocator.Locator.Bind<IMessageService, MessageService>(LifetimeMode.Singleton); ServiceLocator.Locator.Bind<IDialogsManager, IDialogsManager>(new DialogsManager(quickbloxClient)); ServiceLocator.Locator.Bind<IPushNotificationsManager, IPushNotificationsManager>(new PushNotificationsManager(quickbloxClient)); ServiceLocator.Locator.Bind<IFileStorage, IFileStorage>(fileStorage); ServiceLocator.Locator.Bind<IImageService, IImageService>(new ImagesService(quickbloxClient, fileStorage)); ServiceLocator.Locator.Bind<ICachingQuickbloxClient, ICachingQuickbloxClient>(new CachingQuickbloxClient(quickbloxClient)); ServiceLocator.Locator.Bind<ICredentialsService, CredentialsService>(LifetimeMode.Singleton); UnhandledException += OnUnhandledException; this.InitializeComponent(); this.Suspending += this.OnSuspending; }
public static async Task ClassInitialize(TestContext testContext) { var logger = new Logger.DebugLogger(); client1 = new QuickbloxClient((int)appId, authKey, authSecret, apiEndpoint, chatEndpoint, logger); #if DEBUG client1.ChatXmppClient.DebugClientName = "1"; #endif await client1.ChatXmppClient.Connect(id1, password1); client2 = new QuickbloxClient((int)appId, authKey, authSecret, apiEndpoint, chatEndpoint, logger); #if DEBUG client2.ChatXmppClient.DebugClientName = "2"; #endif await client2.ChatXmppClient.Connect(id2, password2); client3 = new QuickbloxClient((int)appId, authKey, authSecret, apiEndpoint, chatEndpoint, logger); #if DEBUG client3.ChatXmppClient.DebugClientName = "3"; #endif await client3.ChatXmppClient.Connect(id3, password3); }
internal ChatClient(QuickbloxClient quickbloxClient) { this.quickbloxClient = quickbloxClient; }
public ContentClientHelper(QuickbloxClient quickbloxClient) { this.quickbloxClient = quickbloxClient; }
/// <summary> /// Initializes a new instance of the <see cref="ContentClient"/> class. /// </summary> /// <param name="client">QuickbloxClient</param> internal ContentClient(QuickbloxClient client) { this.quickbloxClient = client; }
/// <summary> /// Initializes a new instance of the <see cref="CustomObjectsClient"/> class. /// </summary> /// <param name="client">The client.</param> internal CustomObjectsClient(QuickbloxClient client) { this.quickbloxClient = client; }
/// <summary> /// Initializes a new instance of the <see cref="NotificationClient"/> class. /// </summary> /// <param name="client">The client.</param> internal NotificationClient(QuickbloxClient client) { this.quickbloxClient = client; }
/// <summary> /// Initializes a new instance of the <see cref="LocationClient"/> class. /// </summary> /// <param name="client">The client.</param> internal LocationClient(QuickbloxClient client) { this.quickbloxClient = client; }
public void Init(QuickbloxClient client) { this.chatXmppClient = client.ChatXmppClient; this.webSyncClient = client.WebSyncClient; }
public ChatXmppClient(QuickbloxClient quickbloxClient) { this.quickbloxClient = quickbloxClient; Contacts = new List <RosterItem>(); Presences = new List <Jid>(); }
public void Init(QuickbloxClient client) { this.chatXmppClient = client.ChatXmppClient; this.webSyncClient = client.WebSyncClient; }
public async Task TestInitialize() { QuickbloxPlatform.Init(); client = new QuickbloxClient((int)ApplicationId, AuthorizationKey, AuthorizationSecret, GlobalConstant.ApiBaseEndPoint, GlobalConstant.ChatEndpoint); }
public WebSyncClient(QuickbloxClient client) { this.client = client; this.client.ChatXmppClient.MessageReceived += OnMessageReceived; }
/// <summary> /// Initializes a new instance of the <see cref="UsersClient"/> class. /// </summary> /// <param name="quickbloxClient">The quickblox client.</param> internal UsersClient(QuickbloxClient quickbloxClient) { this.quickbloxClient = quickbloxClient; }
internal AuthenticationClient(QuickbloxClient client, ICryptographicProvider cryptographicProvider) { this.quickbloxClient = client; this.cryptographicProvider = cryptographicProvider; }