File Manager / inc / model /

clipboard.h

  1. /*
  2. * Copyright 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. *
  16. */
  17.  
  18. #ifndef CLIPBOARD_H_
  19. #define CLIPBOARD_H_
  20.  
  21. #include "utils/app-types.h"
  22.  
  23. /* Forward declaration: */
  24.  
  25. typedef struct _clipboard clipboard;
  26.  
  27. /**
  28. * @brief Create clipboard instance
  29. * @return Clipboard instance on success, otherwise NULL
  30. */
  31. clipboard *clipboard_create();
  32.  
  33. /**
  34. * @brief Destroy clipboard instance
  35. * @param[in] clipboard_obj Clipboard instance
  36. */
  37. void clipboard_destroy(clipboard *clipboard_obj);
  38.  
  39. /**
  40. * @brief Save file list to clipboard
  41. * @param[in] clipboard_obj Clipboard instance
  42. * @param[in] file_list File list to save
  43. * @return Error code. RESULT_TYPE_OK if operation success.
  44. */
  45. int clipboard_add_data(clipboard *clipboard_obj, Eina_List *file_list);
  46.  
  47. /**
  48. * @brief Get file list from clipboard
  49. * @param[in] clipboard_obj Clipboard instance
  50. * @param[out] file_list File list get from clipboard
  51. * @return Error code. RESULT_TYPE_OK if operation success.
  52. */
  53. int clipboard_get_data(clipboard *clipboard_obj, Eina_List **file_list);
  54.  
  55. /**
  56. * @brief Save operation type to clipboard
  57. * @param[in] clipboard_obj Clipboard instance
  58. * @param[in] type Type of operation to save
  59. * @return Error code. RESULT_TYPE_OK if operation success.
  60. */
  61. int clipboard_set_operation(clipboard *clipboard_obj, operation_type type);
  62.  
  63. /**
  64. * @brief Get operation type from clipboard
  65. * @param[in] clipboard_obj Clipboard instance
  66. * @param[out] type Type of operation get from clipboard
  67. * @return Error code. RESULT_TYPE_OK if operation success.
  68. */
  69. int clipboard_get_operation(clipboard *clipboard_obj, operation_type *type);
  70.  
  71. /**
  72. * @brief Check if clipboard is empty
  73. * @param[in] clipboard_obj Clipboard instance
  74. * @param[out] empty Empty status get from clipboard. EINA_TRUE - if is empty, EINA_FALSE - otherwise
  75. * @return Error code. RESULT_TYPE_OK if operation success.
  76. */
  77. int clipboard_is_empty(clipboard *clipboard_obj, Eina_Bool *empty);
  78.  
  79. /**
  80. * @brief Clear all data saved in clipboard
  81. * @param[in] clipboard_obj Clipboard instance
  82. * @return Error code. RESULT_TYPE_OK if operation success.
  83. */
  84. int clipboard_clear(clipboard *obj);
  85.  
  86. #endif /* CLIPBOARD_H_ */