Add UI classes for handling incoming connections and pincode requests
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26010 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
||||
*
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CONNECTION_INCOMING_H_
|
||||
#define _CONNECTION_INCOMING_H_
|
||||
|
||||
|
||||
//----------------------- Global includes ----------------------
|
||||
#include <AppKit.h>
|
||||
#include <SupportKit.h>
|
||||
#include <InterfaceKit.h>
|
||||
#include <iostream.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
class RemoteDevice;
|
||||
|
||||
class ConnectionView
|
||||
: public BView
|
||||
{
|
||||
public:
|
||||
ConnectionView(BRect frame, const char *name, uint32 resizeMask, uint32 flags);
|
||||
~ConnectionView();
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
void Draw(BRect update);
|
||||
void Pulse();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
class ConnectionIncoming
|
||||
: public BWindow
|
||||
{
|
||||
public:
|
||||
ConnectionIncoming(RemoteDevice* rDevice);
|
||||
~ConnectionIncoming();
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
virtual bool QuitRequested();
|
||||
|
||||
private:
|
||||
ConnectionView* _ConnectionView;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
||||
*
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _PINCODE_REQUEST_WINDOW_H
|
||||
#define _PINCODE_REQUEST_WINDOW_H
|
||||
|
||||
|
||||
#include <View.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <bluetooth/bluetooth.h>
|
||||
|
||||
class BStringView;
|
||||
class BButton;
|
||||
class BTextControls;
|
||||
|
||||
namespace Bluetooth {
|
||||
|
||||
class RemoteDevice;
|
||||
|
||||
class PincodeView : public BView
|
||||
{
|
||||
public:
|
||||
/* Constructors & Destructor*/
|
||||
PincodeView(BRect rect);
|
||||
|
||||
void SetBDaddr(const char* address);
|
||||
|
||||
BStringView* fMessage;
|
||||
BStringView* fRemoteInfo;
|
||||
BButton* fAcceptButton;
|
||||
BButton* fCancelButton;
|
||||
BTextControl* fPincodeText;
|
||||
|
||||
};
|
||||
|
||||
class PincodeWindow : public BWindow
|
||||
{
|
||||
public:
|
||||
PincodeWindow(RemoteDevice* rDevice);
|
||||
virtual void MessageReceived(BMessage *msg);
|
||||
virtual bool QuitRequested();
|
||||
|
||||
private:
|
||||
PincodeView* fView;
|
||||
bdaddr_t bdaddr;
|
||||
RemoteDevice* fRemoteDevice;
|
||||
BMessenger* fMessenger;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#ifndef _BT_USE_EXPLICIT_NAMESPACE
|
||||
using Bluetooth::PincodeWindow;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user