hrev47908 adds 2 changesets to branch 'master' old head: efc5d0a2fee8d6f9c04f9c2908a468dfb77d6a7b new head: 5f8fd4c0db402af24636bdb68b694deb91a657ff overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=5f8fd4c+%5Eefc5d0a ---------------------------------------------------------------------------- 654ae69: NetworkRequest: add a SetTimeout method. 5f8fd4c: add libshared to the development packages. * We install the headers for many things that are currently in libshared (BColumnListView, BCalendarView, etc). So it makes sense to also provide the lib in an "use at your own risk" way. Only the static library is included, so apps linking against it should continue running on newer Haiku versions even if the content of the lib changes. * 3rd party application developers can now make use of those experimental features without having to copypaste and fork the sources. [ Adrien Destugues <pulkomandy@xxxxxxxxx> ] ---------------------------------------------------------------------------- 5 files changed, 12 insertions(+), 2 deletions(-) build/jam/packages/HaikuDevel | 2 +- build/jam/packages/HaikuDevelSecondary | 2 +- headers/os/net/NetworkRequest.h | 1 + headers/os/net/UrlRequest.h | 1 + src/kits/network/libnetapi/NetworkRequest.cpp | 8 ++++++++ ############################################################################ Commit: 654ae69aa615200d378cb3dac74dd6ad85b62b93 URL: http://cgit.haiku-os.org/haiku/commit/?id=654ae69 Author: Adrien Destugues <pulkomandy@xxxxxxxxx> Date: Wed Sep 24 15:40:59 2014 UTC NetworkRequest: add a SetTimeout method. ---------------------------------------------------------------------------- diff --git a/headers/os/net/NetworkRequest.h b/headers/os/net/NetworkRequest.h index 1d139c7..6acc30e 100644 --- a/headers/os/net/NetworkRequest.h +++ b/headers/os/net/NetworkRequest.h @@ -24,6 +24,7 @@ public: const char* protocolName); virtual status_t Stop(); + virtual status_t SetTimeout(bigtime_t timeout); protected: bool _ResolveHostName(BString host, uint16_t port); diff --git a/headers/os/net/UrlRequest.h b/headers/os/net/UrlRequest.h index 64a0e7d..02770ca 100644 --- a/headers/os/net/UrlRequest.h +++ b/headers/os/net/UrlRequest.h @@ -28,6 +28,7 @@ public: virtual status_t Pause(); virtual status_t Resume(); virtual status_t Stop(); + virtual status_t SetTimeout(bigtime_t timeout) {} // URL protocol parameters modification status_t SetUrl(const BUrl& url); diff --git a/src/kits/network/libnetapi/NetworkRequest.cpp b/src/kits/network/libnetapi/NetworkRequest.cpp index 779bd9c..0393649 100644 --- a/src/kits/network/libnetapi/NetworkRequest.cpp +++ b/src/kits/network/libnetapi/NetworkRequest.cpp @@ -35,6 +35,14 @@ BNetworkRequest::Stop() } +void +BNetworkRequest::SetTimeout(bigtime_t timeout) +{ + if (fSocket) + fSocket->SetTimeout(timeout); +} + + bool BNetworkRequest::_ResolveHostName(BString host, uint16_t port) { ############################################################################ Revision: hrev47908 Commit: 5f8fd4c0db402af24636bdb68b694deb91a657ff URL: http://cgit.haiku-os.org/haiku/commit/?id=5f8fd4c Author: Adrien Destugues <pulkomandy@xxxxxxxxx> Date: Fri Sep 26 13:43:00 2014 UTC add libshared to the development packages. * We install the headers for many things that are currently in libshared (BColumnListView, BCalendarView, etc). So it makes sense to also provide the lib in an "use at your own risk" way. Only the static library is included, so apps linking against it should continue running on newer Haiku versions even if the content of the lib changes. * 3rd party application developers can now make use of those experimental features without having to copypaste and fork the sources. ---------------------------------------------------------------------------- diff --git a/build/jam/packages/HaikuDevel b/build/jam/packages/HaikuDevel index 587b0a8..93a8ca1 100644 --- a/build/jam/packages/HaikuDevel +++ b/build/jam/packages/HaikuDevel @@ -35,7 +35,7 @@ for lib in [ HaikuImageGetSystemLibs ] $(developmentLibs) { } # static libraries -AddFilesToPackage develop lib : <$(architecture)>liblocalestub.a ; +AddFilesToPackage develop lib : <$(architecture)>liblocalestub.a libshared.a ; # the POSIX error code mapper library AddFilesToPackage develop lib : libposix_error_mapper.a ; diff --git a/build/jam/packages/HaikuDevelSecondary b/build/jam/packages/HaikuDevelSecondary index baa7feb..801c715 100644 --- a/build/jam/packages/HaikuDevelSecondary +++ b/build/jam/packages/HaikuDevelSecondary @@ -34,7 +34,7 @@ for lib in [ HaikuImageGetSystemLibs ] $(developmentLibs) { # static libraries AddFilesToPackage develop lib $(architecture) - : <$(architecture)>liblocalestub.a ; + : <$(architecture)>liblocalestub.a <$(architecture)>libshared.a ; # the POSIX error code mapper library AddFilesToPackage develop lib $(architecture)