Libosso API: osso_mime_set_cb cannot set the callback successfully

Bug #176023 reported by yanglei
2
Affects Status Importance Assigned to Milestone
Moblin UI Framework
Invalid
Medium
Horace

Bug Description

the API set the callback but I do some operation on MIME file, it cannot trigger the callback invoked

-----------------------------------------------------------------------------------------------------------------------------------------------
//set callback function and open moblin-notes
result = osso_mime_unset_cb(osso_context);
    if(result != OSSO_OK) {
        if(result == OSSO_ERROR)
                g_print("ERROR: osso_mime_unset_cb return OSSO_ERROR\n");
        else if(result == OSSO_INVALID)
                g_print("ERROR: osso_mime_unset_cb return OSSO_INVALID\n");
        else
                g_print("ERROR: osso_mime_unset_cb return UNKNOWN\n");
        return -1;
    }
    loop = g_main_loop_new(NULL, FALSE);
    osso_rpc_run_with_defaults(osso_context, "org.moblin.notes", "open",
                               NULL, DBUS_TYPE_INVALID);
    g_main_loop_run(loop);

-----------------------------------------------------------------------------------------------------------------------------------------------
//callback function:
void mime_cb(gpointer data, int argc, gchar **argv)
{
    int i;
    g_print("mime_cb called: %d files to open\n");
    if(argc != 0) {
        for(i=argc; i>0; --i) {
            g_print("%d file URL: %s\n", i, *argv);
        }
    }
    g_main_loop_quit(loop);
}
-----------------------------------------------------------------------------------------------------------------------------------------------
Open MIME operation:
open a file from open dialog of notes. we expect the callback function will be called but no any response

yanglei (lei-a-yang)
Changed in moblin-ui-framework:
assignee: nobody → horace-li
importance: Undecided → Medium
Horace (horace-li)
Changed in moblin-ui-framework:
status: New → Triaged
Revision history for this message
yanglei (lei-a-yang) wrote :

assign milestone - M9

Changed in moblin-ui-framework:
milestone: none → m9
Revision history for this message
Horace (horace-li) wrote :

Looking into libosso source code, and it seems that this API is not used externally, macro and data structure definitions for this API are only available inside libosso. Set it to invalid.

Changed in moblin-ui-framework:
status: Triaged → Invalid
Revision history for this message
yanglei (lei-a-yang) wrote :

Agree with Horace's comment.
I marked tag "verification-done".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.