mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 07:06:11 -04:00
Merge branch 'master' into release.
Change-Id: Id627ceca5ef60281e024ff80fc1848b3ccb6c14d
This commit is contained in:
@@ -65,6 +65,7 @@ cc_library(
|
||||
"//platform:utils",
|
||||
"//platform/api",
|
||||
"//platform/impl/g3",
|
||||
"//platform/impl/shared:file",
|
||||
"//platform/impl/shared/sample:sample_wifi_medium",
|
||||
"//platform/port:string",
|
||||
],
|
||||
|
||||
@@ -63,6 +63,7 @@ target_link_libraries(core_build_test
|
||||
core
|
||||
core_types
|
||||
platform_impl_g3
|
||||
platform_impl_shared_file
|
||||
platform_impl_shared_posix_lock
|
||||
platform_impl_shared_sample
|
||||
platform_port_string
|
||||
|
||||
@@ -21,7 +21,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"
|
||||
|
||||
@@ -18,10 +18,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 {
|
||||
@@ -301,10 +302,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(
|
||||
|
||||
@@ -31,17 +31,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
|
||||
|
||||
@@ -39,7 +39,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