Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c4380fd9
Kaydet (Commit)
c4380fd9
authored
Eyl 06, 2012
tarafından
Andrzej J.R. Hunt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved all internal details for ClientInfo out of the header.
Change-Id: I64102536f12875b9834ce99763925f1544a87e8f
üst
00bc3078
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
28 deletions
+25
-28
RemoteServer.hxx
sd/source/ui/inc/RemoteServer.hxx
+1
-13
Server.cxx
sd/source/ui/remotecontrol/Server.cxx
+24
-15
No files found.
sd/source/ui/inc/RemoteServer.hxx
Dosyayı görüntüle @
c4380fd9
...
...
@@ -51,19 +51,7 @@ namespace sd
mAddress
(
rAddress
)
{}
};
struct
ClientInfoInternal
:
ClientInfo
{
BufferedStreamSocket
*
mpStreamSocket
;
rtl
::
OUString
mPin
;
ClientInfoInternal
(
const
rtl
::
OUString
rName
,
const
rtl
::
OUString
rAddress
,
BufferedStreamSocket
*
pSocket
,
rtl
::
OUString
rPin
)
:
ClientInfo
(
rName
,
rAddress
),
mpStreamSocket
(
pSocket
),
mPin
(
rPin
)
{}
};
struct
ClientInfoInternal
;
class
RemoteServer
:
public
salhelper
::
Thread
{
...
...
sd/source/ui/remotecontrol/Server.cxx
Dosyayı görüntüle @
c4380fd9
...
...
@@ -40,18 +40,25 @@ using rtl::OString;
using
namespace
::
osl
;
using
namespace
::
comphelper
;
// struct ClientInfoInternal:
// ClientInfo
// {
// osl::StreamSocket mStreamSocket;
// rtl::OUString mPin;
// ClientInfoInternal( const rtl::OUString rName,
// const rtl::OUString rAddress,
// osl::StreamSocket &rSocket, rtl::OUString rPin ):
// ClientInfo( rName, rAddress ),
// mStreamSocket( rSocket ),
// mPin( rPin ) {}
// };
namespace
sd
{
/**
* Used to keep track of clients that have attempted to connect, but haven't
* yet been approved.
*/
struct
ClientInfoInternal
:
ClientInfo
{
BufferedStreamSocket
*
mpStreamSocket
;
rtl
::
OUString
mPin
;
ClientInfoInternal
(
const
rtl
::
OUString
rName
,
const
rtl
::
OUString
rAddress
,
BufferedStreamSocket
*
pSocket
,
rtl
::
OUString
rPin
)
:
ClientInfo
(
rName
,
rAddress
),
mpStreamSocket
(
pSocket
),
mPin
(
rPin
)
{}
};
}
RemoteServer
::
RemoteServer
()
:
Thread
(
"RemoteServerThread"
),
...
...
@@ -72,11 +79,13 @@ void RemoteServer::execute()
if
(
!
mSocket
.
bind
(
aAddr
)
)
{
// Error binding
return
;
}
if
(
!
mSocket
.
listen
(
3
)
)
{
// Error listening
return
;
}
while
(
true
)
{
...
...
@@ -108,6 +117,7 @@ void RemoteServer::execute()
mAvailableClients
.
push_back
(
pClient
);
// Read off any additional non-empty lines
// We know that we at least have the empty termination line to read.
do
{
pSocket
->
readLine
(
aLine
);
...
...
@@ -126,10 +136,9 @@ void RemoteServer::execute()
OUString
sPin
;
axPin
>>=
sPin
;
if
(
!
sPin
.
equals
(
pClient
->
mPin
)
)
{
break
;
if
(
sPin
.
equals
(
pClient
->
mPin
)
)
{
connectClient
(
pClient
,
sPin
)
;
}
connectClient
(
pClient
,
sPin
);
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment