smbprovider: Add CopyEntry to D-Bus

This change adds a D-Bus definition for CopyEntry
and adds a stub method on SmbProvider.

TEST=emerges
BUG=chromium:757625
Change-Id: I478404e14d1eeb941a206d8ca3fe21dcc89d9981
Reviewed-on: https://chromium-review.googlesource.com/923285
Commit-Ready: Bailey Berro <baileyberro@chromium.org>
Tested-by: Bailey Berro <baileyberro@chromium.org>
Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org>
diff --git a/smbprovider/dbus_bindings/org.chromium.SmbProvider.xml b/smbprovider/dbus_bindings/org.chromium.SmbProvider.xml
index 1dc2d67..a6b285b 100644
--- a/smbprovider/dbus_bindings/org.chromium.SmbProvider.xml
+++ b/smbprovider/dbus_bindings/org.chromium.SmbProvider.xml
@@ -245,7 +245,7 @@
 
     <method name="MoveEntry">
       <tp:docstring>
-        Moves an entry at specified source path to specified destination path.
+        Moves an entry at the specified source path to the specified destination path.
       </tp:docstring>
       <arg name="options_blob" type="ay" direction="in">
         <tp:docstring>
@@ -260,5 +260,22 @@
       <annotation name="org.chromium.DBus.Method.Kind" value="simple"/>
     </method>
 
+    <method name="CopyEntry">
+      <tp:docstring>
+        Copies an entry at the specified source path to the specified destination path.
+      </tp:docstring>
+      <arg name="options_blob" type="ay" direction="in">
+        <tp:docstring>
+          Serialized CopyEntryOptionsProto protobuf.
+        </tp:docstring>
+      </arg>
+      <arg name="error_code" type="i" direction="out">\
+        <tp:docstring>
+          Returned error code. See ErrorType enum.
+        </tp:docstring>
+      </arg>
+      <annotation name="org.chromium.DBus.Method.Kind" value="simple"/>
+    </method>
+
   </interface>
 </node>
diff --git a/smbprovider/etc/dbus-1/org.chromium.SmbProvider.conf b/smbprovider/etc/dbus-1/org.chromium.SmbProvider.conf
index 16801e0..839d748 100644
--- a/smbprovider/etc/dbus-1/org.chromium.SmbProvider.conf
+++ b/smbprovider/etc/dbus-1/org.chromium.SmbProvider.conf
@@ -51,5 +51,8 @@
     <allow send_destination="org.chromium.SmbProvider"
             send_interface="org.chromium.SmbProvider"
             send_member="MoveEntry"/>
+    <allow send_destination="org.chromium.SmbProvider"
+            send_interface="org.chromium.SmbProvider"
+            send_member="CopyEntry"/>
   </policy>
 </busconfig>
diff --git a/smbprovider/smbprovider.cc b/smbprovider/smbprovider.cc
index 4980db4..c643059 100644
--- a/smbprovider/smbprovider.cc
+++ b/smbprovider/smbprovider.cc
@@ -297,6 +297,11 @@
   return success ? static_cast<int32_t>(ERROR_OK) : error_code;
 }
 
+int32_t SmbProvider::CopyEntry(const ProtoBlob& options_blob) {
+  NOTIMPLEMENTED();
+  return 0;
+}
+
 template <typename Proto>
 bool SmbProvider::GetFullPath(Proto* options, std::string* full_path) const {
   DCHECK(options);
diff --git a/smbprovider/smbprovider.h b/smbprovider/smbprovider.h
index f45d4d2..7cbcc95 100644
--- a/smbprovider/smbprovider.h
+++ b/smbprovider/smbprovider.h
@@ -80,6 +80,8 @@
 
   int32_t MoveEntry(const ProtoBlob& options_blob) override;
 
+  int32_t CopyEntry(const ProtoBlob& options_blob) override;
+
   // Register DBus object and interfaces.
   void RegisterAsync(
       const AsyncEventSequencer::CompletionAction& completion_callback);