Add commit_content API 49/131449/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 29 May 2017 08:49:47 +0000 (17:49 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 30 May 2017 10:54:38 +0000 (19:54 +0900)
Change-Id: I7bee1336a121454b7bb4a6e646910f13c2898404
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/sclconnection-isf.cpp
src/sclconnection-isf.h
src/sclconnection.cpp
src/sclconnection.h
src/sclcore.cpp
src/sclcore.h
src/sclcoreimpl.cpp
src/sclcoreimpl.h

index f3433460f3dbc57c6a5bab9506602ef84f280bff..deb65111fdfcebecdc0f54af37f76ce596964011 100644 (file)
@@ -1127,6 +1127,13 @@ void CSCLConnectionISF::request_ise_hide()
     }
 }
 
+void CSCLConnectionISF::commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types)
+{
+    if (m_initialized) {
+        m_helper_agent.commit_content(content, description, mime_types);
+    }
+}
+
 extern "C"
 {
     EXAPI void scim_module_init(void) {
index b0621ab8fd10522518b0efa16680ba2a8e66de0b..84b226d378cef8bdbd20db47d0050bbbaa8b76af 100644 (file)
@@ -87,6 +87,7 @@ public:
     sclint get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor);
     void get_selection_text(sclchar **text);
     void request_ise_hide();
+    void commit_content(const char *content, const char *description, const char *mime_types);
 private:
     sclboolean m_initialized;
 
index 76941145852ecd4324c3587d619a396d90156b8d..23ebc2b051269bb72c2ce0117ace2783810e646a 100644 (file)
@@ -358,3 +358,10 @@ void CSCLConnection::request_ise_hide()
         m_impl->request_ise_hide();
     }
 }
+
+void CSCLConnection::commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types)
+{
+    if (m_impl) {
+        m_impl->commit_content(content, description, mime_types);
+    }
+}
index 302583bc2200419f82454cd9186b4624432ad96b..e2e49295bd8f299589d9317ed430e8519f92c2a0 100644 (file)
@@ -87,6 +87,7 @@ public:
     virtual sclint get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor);
     virtual void get_selection_text(sclchar **text);
     virtual void request_ise_hide();
+    virtual void commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types);
 protected:
     std::string m_backend_identifier;
 
index c543dcde1819d9f61fee8e45521aaf70e63cb09e..c8abe0688accf35dc921ff43d669ed5b78096b37 100644 (file)
@@ -359,3 +359,10 @@ void CSCLCore::request_ise_hide() const
         m_impl->request_ise_hide();
     }
 }
+
+void CSCLCore::commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types)
+{
+    if (m_impl) {
+        m_impl->commit_content(content, description, mime_types);
+    }
+}
index 383c1f525b5f46e9eeb177c566e0cb49b8a27d52..719f08c089ab1e6b80d5561d640bfd7647dc4748 100644 (file)
@@ -377,6 +377,14 @@ public:
      */
     void request_ise_hide() const;
 
+    /**
+     * @brief Commit a content URI to its connected editor.
+     *
+     * @param[in] content a content URL to be sent.
+     * @param[in] description a content description.
+     * @param[in] mime_types a MIME type string.
+     */
+    void commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types);
 private:
     CSCLCoreImpl *m_impl;
 };
index 468078e17b81bd10ed18bfadbc59df9ebbe7dc69..915cb1ef01988b93f42ae6a06ad84b3de6652c58 100644 (file)
@@ -373,3 +373,8 @@ void CSCLCoreImpl::request_ise_hide()
 {
     m_connection.request_ise_hide();
 }
+
+void CSCLCoreImpl::commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types)
+{
+    m_connection.commit_content(content, description, mime_types);
+}
index 61456992afc03b56f84312c681310e4251d52931..af7f7f0f0ead3943e3a63f7959ea9cd20bc94793 100644 (file)
@@ -106,6 +106,7 @@ public:
     void get_selection_text(sclchar **text);
 
     void request_ise_hide();
+    void commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types);
 private:
     ISCLCoreEventCallback *m_event_callback;