mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 07:06:11 -04:00
Roll forward to cl/314549634
Change-Id: I4d1e7eacd5fa4078a094571ad6d5f51e422535ff
This commit is contained in:
committed by
Alexey Polyudov
parent
ae1c427b99
commit
cffbc04508
@@ -51,6 +51,7 @@ cc_library(
|
||||
"//platform:utils",
|
||||
"//platform/api",
|
||||
"//platform/impl/g3",
|
||||
"//platform/impl/shared:file",
|
||||
"//platform/impl/shared/sample:sample_wifi_medium",
|
||||
"//platform/port:string",
|
||||
],
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "core/status.h"
|
||||
#include "platform/api/platform.h"
|
||||
#include "platform/byte_array.h"
|
||||
#include "platform/file_impl.h"
|
||||
#include "platform/impl/shared/file_impl.h"
|
||||
#include "platform/impl/shared/sample/sample_wifi_medium.h"
|
||||
#include "platform/port/string.h"
|
||||
#include "platform/ptr.h"
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
|
||||
#include "core/payload.h"
|
||||
#include "platform/api/condition_variable.h"
|
||||
#include "platform/api/input_file.h"
|
||||
#include "platform/api/lock.h"
|
||||
#include "platform/api/output_file.h"
|
||||
#include "platform/byte_array.h"
|
||||
#include "platform/exception.h"
|
||||
#include "platform/file_impl.h"
|
||||
#include "platform/pipe.h"
|
||||
|
||||
namespace location {
|
||||
@@ -287,10 +288,9 @@ Ptr<InternalPayload> InternalPayloadFactory<Platform>::createIncoming(
|
||||
}
|
||||
|
||||
case PayloadTransferFrame::PayloadHeader::FILE: {
|
||||
const std::string payload_path = Platform::getPayloadPath(payload_id);
|
||||
Ptr<InputFile> input_file = MakePtr(new InputFileImpl(
|
||||
payload_path, payload_transfer_frame.payload_header().total_size()));
|
||||
Ptr<OutputFile> output_file = MakePtr(new OutputFileImpl(payload_path));
|
||||
Ptr<OutputFile> output_file = Platform::createOutputFile(payload_id);
|
||||
Ptr<InputFile> input_file = Platform::createInputFile(
|
||||
payload_id, payload_transfer_frame.payload_header().total_size());
|
||||
ConstPtr<Payload> payload = MakeConstPtr(
|
||||
new Payload(payload_id, MakeConstPtr(new Payload::File(input_file))));
|
||||
return MakePtr(new IncomingFileInternalPayload(
|
||||
|
||||
@@ -17,17 +17,17 @@ namespace connections {
|
||||
template <typename Platform>
|
||||
class UUID {
|
||||
public:
|
||||
explicit UUID(const string& data);
|
||||
explicit UUID(const std::string& data);
|
||||
UUID(std::int64_t most_sig_bits, std::int64_t least_sig_bits);
|
||||
~UUID();
|
||||
|
||||
// Returns the canonical textual representation
|
||||
// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) of the
|
||||
// UUID.
|
||||
string str();
|
||||
std::string str();
|
||||
|
||||
private:
|
||||
string data_;
|
||||
std::string data_;
|
||||
};
|
||||
|
||||
} // namespace connections
|
||||
|
||||
@@ -7,7 +7,7 @@ cc_library(
|
||||
deps = [
|
||||
"//platform:utils",
|
||||
"//platform/api",
|
||||
"//webrtc/files/stable/webrtc/api:libjingle_peerconnection_api",
|
||||
"//webrtc/api:libjingle_peerconnection_api",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -20,7 +20,7 @@ cc_test(
|
||||
"//platform/api",
|
||||
"//platform/impl/g3", # buildcleaner: keep
|
||||
"//testing/base/public:gunit_main",
|
||||
"//webrtc/files/stable/webrtc/api:libjingle_peerconnection_api",
|
||||
"//webrtc/api:libjingle_peerconnection_api",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -45,7 +45,7 @@ cc_library(
|
||||
":peer_id",
|
||||
"//platform:types",
|
||||
"//location/nearby/mediums/proto:web_rtc_signaling_frames_cc_proto",
|
||||
"//webrtc/files/stable/webrtc/api:libjingle_peerconnection_api",
|
||||
"//webrtc/api:libjingle_peerconnection_api",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -72,6 +72,6 @@ cc_test(
|
||||
"//platform/impl/g3", # buildcleaner: keep
|
||||
"//net/proto2/public:proto2",
|
||||
"//testing/base/public:gunit_main",
|
||||
"//webrtc/files/stable/webrtc/pc:peerconnection", # buildcleaner: keep
|
||||
"//webrtc/pc:peerconnection", # buildcleaner: keep
|
||||
],
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "platform/byte_array.h"
|
||||
#include "platform/ptr.h"
|
||||
#include "location/nearby/mediums/proto/web_rtc_signaling_frames.pb.h"
|
||||
#include "webrtc/files/stable/webrtc/api/peer_connection_interface.h"
|
||||
#include "webrtc/api/peer_connection_interface.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "platform/api/output_stream.h"
|
||||
#include "platform/api/socket.h"
|
||||
#include "platform/pipe.h"
|
||||
#include "webrtc/files/stable/webrtc/api/data_channel_interface.h"
|
||||
#include "webrtc/api/data_channel_interface.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "platform/ptr.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "webrtc/files/stable/webrtc/api/data_channel_interface.h"
|
||||
#include "webrtc/api/data_channel_interface.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
|
||||
@@ -25,7 +25,7 @@ bool Strategy::isValid() const {
|
||||
return kP2PStar == *this || kP2PCluster == *this || kP2PPointToPoint == *this;
|
||||
}
|
||||
|
||||
string Strategy::getName() const {
|
||||
std::string Strategy::getName() const {
|
||||
if (Strategy::kP2PCluster == *this) {
|
||||
return "P2P_CLUSTER";
|
||||
} else if (Strategy::kP2PStar == *this) {
|
||||
|
||||
Reference in New Issue
Block a user