Tizen Native API  5.0
Attach panel

Attach panel provides functions to attach images, voices, contacts, events and files. Users can attach images, take pictures, record voice and select files to attach into the caller app.

Required Header

#include <attach_panel.h>

Overview

Related Features

This API is related with the following features:

Functions

int attach_panel_create (Evas_Object *conformant, attach_panel_h *attach_panel)
 Creates an attach panel.
int attach_panel_destroy (attach_panel_h attach_panel)
 Destroys the attach panel.
int attach_panel_add_content_category (attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data)
 Adds a content category in the attach panel.
int attach_panel_remove_content_category (attach_panel_h attach_panel, attach_panel_content_category_e content_category)
 Removes the content category from the attach panel.
int attach_panel_set_extra_data (attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data)
 Sets extra data to send to the content category using a bundle.
int attach_panel_set_result_cb (attach_panel_h attach_panel, attach_panel_result_cb result_cb, void *user_data)
 Sets the result callback that will be called when an user selects and confirms something to attach in the attach panel.
int attach_panel_unset_result_cb (attach_panel_h attach_panel)
 Unsets the result callback that will be called when an user selects and confirms something to attach in the attach panel.
int attach_panel_set_event_cb (attach_panel_h attach_panel, attach_panel_event_cb panel_event_cb, void *user_data)
 Sets the event callback that will be called when reserved events are published from the panel-side.
int attach_panel_unset_event_cb (attach_panel_h attach_panel)
 Unsets the event callback.
int attach_panel_show (attach_panel_h attach_panel)
 Shows the attach panel, asynchronously.
int attach_panel_show_without_animation (attach_panel_h attach_panel)
 Shows the attach panel, synchronously.
int attach_panel_hide (attach_panel_h attach_panel)
 Hides the attach panel, asynchronously.
int attach_panel_hide_without_animation (attach_panel_h attach_panel)
 Hides the attach panel, synchronously.
int attach_panel_get_visibility (attach_panel_h attach_panel, bool *visible)
 Gets a value that indicates whether the attach_panel is visible.
int attach_panel_get_state (attach_panel_h attach_panel, attach_panel_state_e *state)
 Gets the state of the attach_panel.

Typedefs

typedef enum
attach_panel_content_category 
attach_panel_content_category_e
 Enumeration for content categories.
typedef enum attach_panel_event attach_panel_event_e
 Enumeration for events.
typedef struct _attach_panel * attach_panel_h
 Attach panel handle.
typedef void(* attach_panel_result_cb )(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *user_data)
 Called when an user selects and confirms something to attach on the caller app.
typedef void(* attach_panel_event_cb )(attach_panel_h attach_panel, attach_panel_event_e event, void *event_info, void *user_data)
 Called when reserved events are published from the panel-side.
typedef enum attach_panel_error attach_panel_error_e
 Enumeration for values of attach-panel response types.

Typedef Documentation

Enumeration for values of attach-panel response types.

Since :
2.4
typedef void(* attach_panel_event_cb)(attach_panel_h attach_panel, attach_panel_event_e event, void *event_info, void *user_data)

Called when reserved events are published from the panel-side.

Since :
2.4
Parameters:
[in]attach_panelAttach panel handler
[in]eventAttach panel event
[in]event_infoadditional event information.
This can be NULL if there are no necessary information.
[in]user_datauser data
Precondition:
The callback must be registered using attach_panel_set_event_cb()
See also:
attach_panel_set_event_cb()
attach_panel_unset_event_cb()
typedef struct _attach_panel* attach_panel_h

Attach panel handle.

Since :
2.4
typedef void(* attach_panel_result_cb)(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *user_data)

Called when an user selects and confirms something to attach on the caller app.

Since :
2.4
Parameters:
[in]attach_panelAttach panel handler
[in]content_categoryresults are from the content category
[in]resultapp_control handler.
The caller app has to use app_control_get_extra_data_array() to get received data.
http://tizen.org/appcontrol/data/selected
[in]result_coderesult of app_control
[in]user_datauser data
Precondition:
The callback must be registered using attach_panel_set_result_cb()
attach_panel_add_content_category() and attach_panel_show() must be called to invoke this callback.
See also:
App Control API app_control_get_extra_data_array()
attach_panel_set_result_cb()
attach_panel_unset_result_cb()

Enumeration Type Documentation

Enumeration for content categories.

Since :
2.4
See also:
attach_panel_add_content_category()
attach_panel_remove_content_category()
Enumerator:
ATTACH_PANEL_CONTENT_CATEGORY_IMAGE 

Attaching images from the gallery

ATTACH_PANEL_CONTENT_CATEGORY_CAMERA 

Taking pictures to attach

ATTACH_PANEL_CONTENT_CATEGORY_VOICE 

Taking a voice clip to attach

ATTACH_PANEL_CONTENT_CATEGORY_VIDEO 

Attaching video from the gallery

ATTACH_PANEL_CONTENT_CATEGORY_AUDIO 

Attaching audio from my files

ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR 

Attaching calendar data from the calendar

ATTACH_PANEL_CONTENT_CATEGORY_CONTACT 

Attaching contact data from the contacts

ATTACH_PANEL_CONTENT_CATEGORY_MYFILES 

Attaching files data from my files

ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER 

Taking a video clip to attach

ATTACH_PANEL_CONTENT_CATEGORY_DOCUMENT 

attaching files from the document list (Since 3.0)

ATTACH_PANEL_CONTENT_CATEGORY_TAKE_PICTURE 

Launching apps to take pictures will be attached (Since 3.0)

ATTACH_PANEL_CONTENT_CATEGORY_MEMO 

Attaching memo data from the memo (Since 4.0)

Enumeration for values of attach-panel response types.

Since :
2.4
Enumerator:
ATTACH_PANEL_ERROR_NONE 

Successfully handled

ATTACH_PANEL_ERROR_INVALID_PARAMETER 

Request is not valid, invalid parameter or invalid argument value

ATTACH_PANEL_ERROR_OUT_OF_MEMORY 

Memory is not enough to handle a new request

ATTACH_PANEL_ERROR_PERMISSION_DENIED 

Has no permission to attach contents

ATTACH_PANEL_ERROR_ALREADY_EXISTS 

There is already a panel in the conformant

ATTACH_PANEL_ERROR_NOT_INITIALIZED 

The panel is not initialized yet

ATTACH_PANEL_ERROR_UNSUPPORTED_CONTENT_CATEGORY 

Not supported content category

ATTACH_PANEL_ERROR_ALREADY_DESTROYED 

The panel is already removed

ATTACH_PANEL_ERROR_NOT_SUPPORTED 

Not supported (Since 5.0)

Enumeration for events.

Since :
2.4
See also:
attach_panel_set_event_cb()
attach_panel_unset_event_cb()
Enumerator:
ATTACH_PANEL_EVENT_SHOW_START 

Attach panel starts the effect to show

ATTACH_PANEL_EVENT_SHOW_FINISH 

Attach panel finishes the effect to show

ATTACH_PANEL_EVENT_HIDE_START 

Attach panel starts the effect to hide the panel

ATTACH_PANEL_EVENT_HIDE_FINISH 

Attach panel finishes the effect to hide the panel

Enumeration for window state.

Since :
3.0
See also:
attach_panel_get_state()
Enumerator:
ATTACH_PANEL_STATE_HIDDEN 

Attach panel is not visible

ATTACH_PANEL_STATE_PARTIAL 

Attach panel is in partial window mode

ATTACH_PANEL_STATE_FULL 

Attach panel is in full screen mode


Function Documentation

int attach_panel_add_content_category ( attach_panel_h  attach_panel,
attach_panel_content_category_e  content_category,
bundle extra_data 
)

Adds a content category in the attach panel.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediastorage
Privilege:
http://tizen.org/privilege/camera
Privilege:
http://tizen.org/privilege/recorder
Privilege:
http://tizen.org/privilege/appmanager.launch
Privilege:
http://tizen.org/privilege/telephony
Remarks:
The caller app has to check the return value of this function.
Content categories will be shown as the sequence of using attach_panel_add_content_category.
Some contents need time to load it all.
So, it is needed to use this before the mainloop of attach_panel_show().
Privileges,
http://tizen.org/privilege/mediastorage, for using ATTACH_PANEL_CONTENT_CATEGORY_IMAGE or ATTACH_PANEL_CONTENT_CATEGORY_CAMERA
http://tizen.org/privilege/camera, for using ATTACH_PANEL_CONTENT_CATEGORY_CAMERA or ATTACH_PANEL_CONTENT_CATEGORY_TAKE_PICTURE
http://tizen.org/privilege/recorder, for using ATTACH_PANEL_CONTENT_CATEGORY_VOICE
http://tizen.org/privilege/appmanager.launch, for adding content categories on the More tab
http://tizen.org/privilege/telephony, for using ATTACH_PANEL_CONTENT_CATEGORY_CAMERA (Since 5.0)
Deliver more information to the callee with a bundle if you need.
http://tizen.org/appcontrol/data/total_count
http://tizen.org/appcontrol/data/total_size
Parameters:
[in]attach_panelAttach panel handler
[in]content_categoryThe content_category to be added in the attach_panel.
[in]extra_dataThe attach panel send some information using bundle.
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_PERMISSION_DENIEDpermission denied
ATTACH_PANEL_ERROR_NOT_INITIALIZEDnot initialized
ATTACH_PANEL_ERROR_UNSUPPORTED_CONTENT_CATEGORYnot supported content category
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_create()
attach_panel_destroy()
attach_panel_remove_content_category()
attach_panel_set_result_cb()
attach_panel_unset_result_cb()
attach_panel_show()
attach_panel_hide()
attach_panel_get_visibility()
ATTACH_PANEL_CONTENT_CATEGORY_IMAGE
ATTACH_PANEL_CONTENT_CATEGORY_CAMERA
ATTACH_PANEL_CONTENT_CATEGORY_VOICE
ATTACH_PANEL_CONTENT_CATEGORY_VIDEO
ATTACH_PANEL_CONTENT_CATEGORY_AUDIO
ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR
ATTACH_PANEL_CONTENT_CATEGORY_CONTACT
ATTACH_PANEL_CONTENT_CATEGORY_MYFILES
ATTACH_PANEL_CONTENT_CATEGORY_DOCUMENT
ATTACH_PANEL_CONTENT_CATEGORY_TAKE_PICTURE
ATTACH_PANEL_CONTENT_CATEGORY_MEMO
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static void
 _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result,
            app_control_result_e result_code, void *data)
 {
     char **select = NULL;
     int i = 0;
     int length = 0;
     int ret = APP_CONTROL_ERROR_NONE;

     if (!result)
         // Error handling

     if (APP_CONTROL_RESULT_SUCCEEDED != result_code)
         // Error handling

     ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
     if (APP_CONTROL_ERROR_NONE != ret || !select)
         // Error handling

     for (; i < length; i++) {
         printf("path is %s, %d\n", select[i], length);
         free(select[i]);
     }

     free(select);
 }

 static int
 app_control(void *data)
 {
     struct appdata *ad = data;
     bundle *extra_data = NULL;
     int ret = ATTACH_PANEL_ERROR_NONE;

     if (!ad)
         // Error handling

     if (!ad->conformant)
         // Error handling

     ret = attach_panel_create(ad->conformant, &ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     extra_data = bundle_create();
     if (!extra_data)
         // Error handling

     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_count", "3");
     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_size", "10240000");

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_set_result_cb(ad->attach_panel, _result_cb, NULL);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_show(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     bundle_free(extra_data);

       return 0;
 }
int attach_panel_create ( Evas_Object conformant,
attach_panel_h attach_panel 
)

Creates an attach panel.

Since :
2.4
Remarks:
The caller app has to check the return value of this function.
A conformant object can have only one attach_panel_h.
If a caller app try to add more than one attach-panel, it fails to add it.
Parameters:
[in]conformantThe caller's conformant
[out]attach_panelAttach panel handler
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_OUT_OF_MEMORYOut of memory
ATTACH_PANEL_ERROR_ALREADY_EXISTSAlready exists
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
See also:
attach_panel_destroy()
attach_panel_add_content_category()
attach_panel_remove_content_category()
attach_panel_set_extra_data()
attach_panel_set_result_cb()
attach_panel_unset_result_cb()
attach_panel_set_event_cb()
attach_panel_unset_event_cb()
attach_panel_show()
attach_panel_hide()
attach_panel_get_visibility()
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static void
 _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result,
            app_control_result_e result_code, void *data)
 {
     char **select = NULL;
     int i = 0;
     int length = 0;
     int ret = APP_CONTROL_ERROR_NONE;

     if (!result)
         // Error handling

     if (APP_CONTROL_RESULT_SUCCEEDED != result_code)
         // Error handling

     ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
     if (APP_CONTROL_ERROR_NONE != ret || !select)
         // Error handling

     for (; i < length; i++) {
         printf("path is %s, %d\n", select[i], length);
         free(select[i]);
     }

     free(select);
 }

 static int
 app_control(void *data)
 {
     struct appdata *ad = data;
     bundle *extra_data = NULL;
     int ret = ATTACH_PANEL_ERROR_NONE;

     if (!ad)
         // Error handling

     if (!ad->conformant)
         // Error handling

     ret = attach_panel_create(ad->conformant, &ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     extra_data = bundle_create();
     if (!extra_data)
         // Error handling

     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_count", "3");
     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_size", "10240000");

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_set_result_cb(ad->attach_panel, _result_cb, NULL);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_show(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     bundle_free(extra_data);

       return 0;
 }
int attach_panel_destroy ( attach_panel_h  attach_panel)

Destroys the attach panel.

Since :
2.4
Remarks:
The caller app has to check the return value of this function.
Parameters:
[in]attach_panelAttach panel handler
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
See also:
attach_panel_create()
attach_panel_add_content_category()
attach_panel_remove_content_category()
attach_panel_set_extra_data()
attach_panel_set_result_cb()
attach_panel_unset_result_cb()
attach_panel_set_event_cb()
attach_panel_unset_event_cb()
attach_panel_show()
attach_panel_hide()
attach_panel_get_visibility()
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static int
 app_terminate(void *data)
 {
     struct appdata *ad = data;
     int ret = 0;

     if (!ad)
         // Error handling

     if (!ad->attach_panel)
         // Error handling

     ret = attach_panel_hide(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_unset_result_cb(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_destroy(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling
     ad->attach_panel = NULL;

       return 0;
 }
int attach_panel_get_state ( attach_panel_h  attach_panel,
attach_panel_state_e state 
)

Gets the state of the attach_panel.

Since :
3.0
Remarks:
Users can toggle the attach panel between full screen state or partial window state.
Developer can get the state of attach panel by calling this function.
Parameters:
[in]attach_panelThe attach panel handle
[out]stateThe attach_panel window state
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_state_e
Example
 int ret;
 attach_panel_state_e attach_panel_state;

 ret = attach_panel_get_state(attach_panel, &attach_panel_state);
 if (ATTACH_PANEL_ERROR_NONE != ret) {
    // Error handling
 }

 switch (attach_panel_state) {
   case ATTACH_PANEL_STATE_HIDDEN:
     // attach panel is hidden
     break;
   case ATTACH_PANEL_STATE_PARTIAL:
     // for partial window mode
     break;
   case ATTACH_PANEL_STATE_FULL:
     // full screen mode
     break;
 }
int attach_panel_get_visibility ( attach_panel_h  attach_panel,
bool *  visible 
)

Gets a value that indicates whether the attach_panel is visible.

Since :
2.4
Remarks:
The caller app has to check the return value of this function.
Parameters:
[in]attach_panelAttach panel handler
[out]visiblevalue of attach_panel state
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_create()
attach_panel_destroy()
attach_panel_add_content_category()
attach_panel_remove_content_category()
attach_panel_set_extra_data()
attach_panel_set_result_cb()
attach_panel_unset_result_cb()
attach_panel_show()
attach_panel_hide()
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static int
 app_terminate(void *data)
 {
     struct appdata *ad = data;
     bool visible = false;
     int ret = 0;

     if (!ad)
         // Error handling

     if (!ad->attach_panel)
         // Error handling

     ret = attach_panel_get_visibility(ad->attach_panel, &visible);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     if (visible) {
         ret = attach_panel_hide(ad->attach_panel);
         if (ATTACH_PANEL_ERROR_NONE != ret)
             // Error handling
     }

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_unset_result_cb(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_destroy(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
        // Error handling
     ad->attach_panel = NULL;

 return 0;
 }
int attach_panel_hide ( attach_panel_h  attach_panel)

Hides the attach panel, asynchronously.

Since :
2.4
Remarks:
The caller app has to check the return value of this function.
Parameters:
[in]attach_panelAttach panel handler
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_create()
attach_panel_destroy()
attach_panel_add_content_category()
attach_panel_remove_content_category()
attach_panel_set_extra_data()
attach_panel_set_result_cb()
attach_panel_unset_result_cb()
attach_panel_show()
attach_panel_get_visibility()
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static int app_terminate(void *data)
 {
     struct appdata *ad = data;
     int ret = 0;

     if (!ad)
         // Error handling

     if (!ad->attach_panel)
         // Error handling

     ret = attach_panel_hide(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_unset_result_cb(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_destroy(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling
     ad->attach_panel = NULL;

       return 0;
 }

Hides the attach panel, synchronously.

Since :
4.0
Parameters:
[in]attach_panelThe attach panel handle
Returns:
0 on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDThe panel has been already destroyed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_create()
attach_panel_hide()
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static int app_terminate(void *data)
 {
     struct appdata *ad = data;
     int ret = 0;

     if (!ad)
         // Error handling

     if (!ad->attach_panel)
         // Error handling

     ret = attach_panel_hide_without_animation(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_unset_result_cb(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_destroy(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling
     ad->attach_panel = NULL;

       return 0;
 }

Removes the content category from the attach panel.

Since :
2.4
Remarks:
The caller app has to check the return value of this function.
Parameters:
[in]attach_panelAttach panel handler
[in]content_categoryThe content_category adding in the attach_panel.
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_NOT_INITIALIZEDnot initialized
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_create()
attach_panel_destroy()
attach_panel_add_content_category()
attach_panel_set_extra_data()
attach_panel_set_result_cb()
attach_panel_unset_result_cb()
attach_panel_show()
attach_panel_hide()
attach_panel_get_visibility()
ATTACH_PANEL_CONTENT_CATEGORY_IMAGE
ATTACH_PANEL_CONTENT_CATEGORY_CAMERA
ATTACH_PANEL_CONTENT_CATEGORY_VOICE
ATTACH_PANEL_CONTENT_CATEGORY_VIDEO
ATTACH_PANEL_CONTENT_CATEGORY_AUDIO
ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR
ATTACH_PANEL_CONTENT_CATEGORY_CONTACT
ATTACH_PANEL_CONTENT_CATEGORY_MYFILES
ATTACH_PANEL_CONTENT_CATEGORY_DOCUMENT
ATTACH_PANEL_CONTENT_CATEGORY_TAKE_PICTURE
ATTACH_PANEL_CONTENT_CATEGORY_MEMO
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static int
 app_terminate(void *data)
 {
     struct appdata *ad = data;
     int ret = 0;

     if (!ad)
         // Error handling

     if (!ad->attach_panel)
         // Error handling

     ret = attach_panel_hide(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
        // Error handling

     ret = attach_panel_unset_result_cb(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_destroy(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
        // Error handling
     ad->attach_panel = NULL;

     return 0;
 }
int attach_panel_set_event_cb ( attach_panel_h  attach_panel,
attach_panel_event_cb  panel_event_cb,
void *  user_data 
)

Sets the event callback that will be called when reserved events are published from the panel-side.

Since :
2.4
Remarks:
The caller app has to check the return value of this function.
We can set only one callback function with this API.
If you set multiple callbacks with this API,
the last one is registered only.
Parameters:
[in]attach_panelAttach panel handler
[in]panel_event_cbAttach panel event callback
[in]user_dataUser data
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
Postcondition:
The event_cb set with attach_panel_set_event_cb() will be called after publishing reserved events.
See also:
attach_panel_create()
attach_panel_destroy()
attach_panel_show()
attach_panel_hide()
attach_panel_get_visibility()
attach_panel_unset_event_cb()
attach_panel_event_cb
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static void
 _event_cb(attach_panel_h attach_panel, attach_panel_event_e event, void *event_info, void *data)
 {
     switch (event) {
     case ATTACH_PANEL_EVENT_SHOW_START:
         // Event handling
         break;
     case ATTACH_PANEL_EVENT_SHOW_FINISH:
         // Event handling
         break;
     case ATTACH_PANEL_EVENT_HIDE_START:
         // Event handling
         break;
     case ATTACH_PANEL_EVENT_HIDE_FINISH:
         // Event handling
         break;
     default:
         // Error handling
         break;
     }
 }

 static int
 app_control(void *data)
 {
     struct appdata *ad = data;
     int ret = ATTACH_PANEL_ERROR_NONE;

     if (!ad)
         // Error handling

     if (!ad->conformant)
         // Error handling

     ret = attach_panel_create(ad->conformant, &ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
        // Error handling

     ret = attach_panel_set_event_cb(ad->attach_panel, _event_cb, ad);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     // Other routines

       return 0;
 }
int attach_panel_set_extra_data ( attach_panel_h  attach_panel,
attach_panel_content_category_e  content_category,
bundle extra_data 
)

Sets extra data to send to the content category using a bundle.

Since :
2.4
Privilege Level:
public
Remarks:
The caller app has to check the return value of this function.
extra data will be changed using attach_panel_set_extra_data.
http://tizen.org/appcontrol/data/total_count
http://tizen.org/appcontrol/data/total_size
Parameters:
[in]attach_panelAttach panel handler
[in]content_categoryThe content_category to be set the some information in the attach_panel.
[in]extra_dataThe attach panel set some information using bundle.
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_OUT_OF_MEMORYFail to set the extra data
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_create()
attach_panel_destroy()
attach_panel_add_content_category()
attach_panel_remove_content_category()
attach_panel_set_result_cb()
attach_panel_unset_result_cb()
attach_panel_show()
attach_panel_hide()
attach_panel_get_visibility()
ATTACH_PANEL_CONTENT_CATEGORY_IMAGE
ATTACH_PANEL_CONTENT_CATEGORY_CAMERA
ATTACH_PANEL_CONTENT_CATEGORY_VOICE
ATTACH_PANEL_CONTENT_CATEGORY_VIDEO
ATTACH_PANEL_CONTENT_CATEGORY_AUDIO
ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR
ATTACH_PANEL_CONTENT_CATEGORY_CONTACT
ATTACH_PANEL_CONTENT_CATEGORY_MYFILES
ATTACH_PANEL_CONTENT_CATEGORY_DOCUMENT
ATTACH_PANEL_CONTENT_CATEGORY_TAKE_PICTURE
ATTACH_PANEL_CONTENT_CATEGORY_MEMO
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static void
 _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result,
            app_control_result_e result_code, void *data)
 {
     char **select = NULL;
     int i = 0;
     int length = 0;
     int ret = APP_CONTROL_ERROR_NONE;

     if (!result)
         // Error handling

     if (APP_CONTROL_RESULT_SUCCEEDED != result_code)
         // Error handling

     ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
     if (APP_CONTROL_ERROR_NONE != ret || !select)
         // Error handling

     for (; i < length; i++) {
         printf("path is %s, %d\n", select[i], length);
         free(select[i]);
     }

     free(select);
 }

 static void
 _reset_bundle_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
     struct appdata *ad = data;
     bundle *extra_data = NULL;
     int ret = APP_CONTROL_ERROR_NONE;

     if (!ad)
         // Error handling

     extra_data = bundle_create();
     if (!extra_data)
         // Error handling

     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_count", "5");
     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_size", "20480000");

     ret = attach_panel_set_extra_data(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_set_extra_data(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_set_extra_data(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     bundle_free(extra_data);
 }

 static int
 app_control(void *data)
 {
     struct appdata *ad = data;
     bundle *extra_data = NULL;
     int ret = ATTACH_PANEL_ERROR_NONE;

     if (!ad)
         // Error handling

     if (!ad->conformant)
         // Error handling

     ret = attach_panel_create(ad->conformant, &ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     extra_data = bundle_create();
     if (!extra_data)
         // Error handling

     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_count", "3");
     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_size", "10240000");

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
        // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_set_result_cb(ad->attach_panel, _result_cb, NULL);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_show(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     bundle_free(extra_data);

       return 0;
 }
int attach_panel_set_result_cb ( attach_panel_h  attach_panel,
attach_panel_result_cb  result_cb,
void *  user_data 
)

Sets the result callback that will be called when an user selects and confirms something to attach in the attach panel.

Since :
2.4
Remarks:
The caller app has to check the return value of this function.
We can set only one callback function with this API.
If you set multiple callbacks with this API,
the last one is registered only.
Parameters:
[in]attach_panelAttach panel handler
[in]result_cbAttach panel result callback
[in]user_dataUser data
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
Postcondition:
The result_cb set with attach_panel_set_result_cb() will be called after an user select something to attach.
See also:
attach_panel_create()
attach_panel_destroy()
attach_panel_add_content_category()
attach_panel_remove_content_category()
attach_panel_set_extra_data()
attach_panel_unset_result_cb()
attach_panel_show()
attach_panel_hide()
attach_panel_get_visibility()
attach_panel_result_cb
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static void
 _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result,
            app_control_result_e result_code, void *data)
 {
     char **select = NULL;
     int i = 0;
     int length = 0;
     int ret = APP_CONTROL_ERROR_NONE;

     if (!result)
         // Error handling

     if (APP_CONTROL_RESULT_SUCCEEDED != result_code)
        // Error handling

     ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
     if (APP_CONTROL_ERROR_NONE != ret || !select)
         // Error handling

     for (; i < length; i++) {
         printf("path is %s, %d\n", select[i], length);
         free(select[i]);
     }

     free(select);
 }

 static int
 app_control(void *data)
 {
     struct appdata *ad = data;
     bundle *extra_data = NULL;
     int ret = ATTACH_PANEL_ERROR_NONE;

     if (!ad)
         // Error handling

     if (!ad->conformant)
         // Error handling

     ret = attach_panel_create(ad->conformant, &ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     extra_data = bundle_create();
     if (!extra_data)
         // Error handling

     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_count", "3");
     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_size", "10240000");

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
        // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_set_result_cb(ad->attach_panel, _result_cb, NULL);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_show(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     bundle_free(extra_data);

       return 0;
 }
int attach_panel_show ( attach_panel_h  attach_panel)

Shows the attach panel, asynchronously.

Since :
2.4
Remarks:
The caller app has to check the return value of this function.
Parameters:
[in]attach_panelAttach panel handler
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_create()
attach_panel_destroy()
attach_panel_add_content_category()
attach_panel_remove_content_category()
attach_panel_set_extra_data()
attach_panel_set_result_cb()
attach_panel_unset_result_cb()
attach_panel_hide()
attach_panel_get_visibility()
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static void
 _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result,
            app_control_result_e result_code, void *data)
 {
     char **select = NULL;
     int i = 0;
     int length = 0;
     int ret = APP_CONTROL_ERROR_NONE;

     if (!result)
         // Error handling

     if (APP_CONTROL_RESULT_SUCCEEDED != result_code)
         // Error handling

     ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
     if (APP_CONTROL_ERROR_NONE != ret || !select)
         // Error handling

     for (; i < length; i++) {
         printf("path is %s, %d\n", select[i], length);
         free(select[i]);
     }

     free(select);
 }

 static int
 app_control(void *data)
 {
     struct appdata *ad = data;
     bundle *extra_data = NULL;
     int ret = ATTACH_PANEL_ERROR_NONE;

     if (!ad)
         // Error handling

     if (!ad->conformant)
         // Error handling

     ret = attach_panel_create(ad->conformant, &ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     extra_data = bundle_create();
     if (!extra_data)
         // Error handling

     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_count", "3");
     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_size", "10240000");

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
        // Error handling

     ret = attach_panel_set_result_cb(ad->attach_panel, _result_cb, NULL);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_show(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     bundle_free(extra_data);

       return 0;
 }

Shows the attach panel, synchronously.

Since :
4.0
Parameters:
[in]attach_panelThe attach panel handle
Returns:
0 on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDThe panel has been already destroyed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_create()
attach_panel_show()
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static void
 _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result,
            app_control_result_e result_code, void *data)
 {
     char **select = NULL;
     int i = 0;
     int length = 0;
     int ret = APP_CONTROL_ERROR_NONE;

     if (!result)
         // Error handling

     if (APP_CONTROL_RESULT_SUCCEEDED != result_code)
         // Error handling

     ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
     if (APP_CONTROL_ERROR_NONE != ret || !select)
         // Error handling

     for (; i < length; i++) {
         printf("path is %s, %d\n", select[i], length);
         free(select[i]);
     }

     free(select);
 }

 static int
 app_control(void *data)
 {
     struct appdata *ad = data;
     bundle *extra_data = NULL;
     int ret = ATTACH_PANEL_ERROR_NONE;

     if (!ad)
         // Error handling

     if (!ad->conformant)
         // Error handling

     ret = attach_panel_create(ad->conformant, &ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     extra_data = bundle_create();
     if (!extra_data)
         // Error handling

     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_count", "3");
     bundle_add_str(extra_data, "http://tizen.org/appcontrol/data/total_size", "10240000");

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_add_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE, extra_data);
     if (ATTACH_PANEL_ERROR_NONE != ret)
        // Error handling

     ret = attach_panel_set_result_cb(ad->attach_panel, _result_cb, NULL);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_show_without_animation(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     bundle_free(extra_data);

       return 0;
 }

Unsets the event callback.

Since :
2.4
Remarks:
The caller app has to check the return value of this function.
Parameters:
[in]attach_panelAttach panel handler
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_create()
attach_panel_destroy()
attach_panel_show()
attach_panel_hide()
attach_panel_get_visibility()
attach_panel_set_event_cb()
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static int
 app_terminate(void *data)
 {
     struct appdata *ad = data;
     int ret = 0;

     if (!ad)
         // Error handling

     if (!ad->attach_panel)
         // Error handling

     ret = attach_panel_unset_event_cb(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_destroy(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling
     ad->attach_panel = NULL;

       return 0;
 }

Unsets the result callback that will be called when an user selects and confirms something to attach in the attach panel.

Since :
2.4
Remarks:
The caller app has to check the return value of this function.
Parameters:
[in]attach_panelAttach panel handler
Returns:
ATTACH_PANEL_ERROR_NONE on success, otherwise a negative error value
Return values:
ATTACH_PANEL_ERROR_NONESuccessful
ATTACH_PANEL_ERROR_INVALID_PARAMETERInvalid parameter
ATTACH_PANEL_ERROR_ALREADY_DESTROYEDalready removed
ATTACH_PANEL_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Call attach_panel_create() before calling this function.
See also:
attach_panel_create()
attach_panel_destroy()
attach_panel_add_content_category()
attach_panel_remove_content_category()
attach_panel_set_extra_data()
attach_panel_set_result_cb()
attach_panel_show()
attach_panel_hide()
attach_panel_get_visibility()
Example
 #include <attach_panel.h>

 struct appdata {
     Evas_Object *attach_panel;
     Evas_Object *conformant;
 };

 static int
 app_terminate(void *data)
 {
     struct appdata *ad = data;
     int ret = 0;

     if (!ad)
         // Error handling

     if (!ad->attach_panel)
         // Error handling

     ret = attach_panel_hide(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_IMAGE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CAMERA);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_remove_content_category(ad->attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VOICE);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_unset_result_cb(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
         // Error handling

     ret = attach_panel_destroy(ad->attach_panel);
     if (ATTACH_PANEL_ERROR_NONE != ret)
        // Error handling
     ad->attach_panel = NULL;

       return 0;
 }