-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmb_credential.h
42 lines (32 loc) · 1.19 KB
/
smb_credential.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2018 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SMBPROVIDER_SMB_CREDENTIAL_H_
#define SMBPROVIDER_SMB_CREDENTIAL_H_
#include <memory>
#include <string>
#include <utility>
#include <base/files/file_path.h>
#include <libpasswordprovider/password.h>
namespace smbprovider {
struct SmbCredential {
std::string workgroup;
std::string username;
std::unique_ptr<password_provider::Password> password;
base::FilePath password_file;
SmbCredential() = default;
SmbCredential(const std::string& workgroup,
const std::string& username,
std::unique_ptr<password_provider::Password> password,
const base::FilePath& password_file = {})
: workgroup(workgroup),
username(username),
password(std::move(password)),
password_file(password_file) {}
SmbCredential(SmbCredential&& other) = default;
SmbCredential(const SmbCredential&) = delete;
SmbCredential& operator=(const SmbCredential&) = delete;
SmbCredential& operator=(SmbCredential&& other) = default;
};
} // namespace smbprovider
#endif // SMBPROVIDER_SMB_CREDENTIAL_H_