AppleOpenSource/WebKit2-7609.3.5.1.3/WebProcess/InjectedBundle/API/glib/WebKitConsoleMessage.cpp
/**
 * webkit_console_message_get_source:
 * @console_message: a #WebKitConsoleMessage
 *
 * Gets the source of a #WebKitConsoleMessage
 *
 * Returns: a #WebKitConsoleMessageSource indicating the source of @console_message
 *
 * Since: 2.12
 */


Gets the source of a #WebKitConsoleMessage

a #WebKitConsoleMessageSource indicating the source of @console_message


Gets the source of a #WebKitConsoleMessage a #WebKitConsoleMessageSource indicating the source of @console_message
WebKitConsoleMessageSource webkit_console_message_get_source(WebKitConsoleMessage* consoleMessage)
{
    g_return_val_if_fail(consoleMessage, WEBKIT_CONSOLE_MESSAGE_SOURCE_OTHER);
    switch (consoleMessage->source) {
    case JSC::MessageSource::JS:
        return WEBKIT_CONSOLE_MESSAGE_SOURCE_JAVASCRIPT;
    case JSC::MessageSource::Network:
        return WEBKIT_CONSOLE_MESSAGE_SOURCE_NETWORK;
    case JSC::MessageSource::ConsoleAPI:
        return WEBKIT_CONSOLE_MESSAGE_SOURCE_CONSOLE_API;
    case JSC::MessageSource::Security:
        return WEBKIT_CONSOLE_MESSAGE_SOURCE_SECURITY;
    case JSC::MessageSource::Other:
    default:
        break;
    }
    return WEBKIT_CONSOLE_MESSAGE_SOURCE_OTHER;
}
WebKitConsoleMessageSource webkit_console_message_get_source ( WebKitConsoleMessage * consoleMessage ) { g_return_val_if_fail ( consoleMessage , WEBKIT_CONSOLE_MESSAGE_SOURCE_OTHER ) ; switch ( consoleMessage -> source ) { case JSC :: MessageSource :: JS : return WEBKIT_CONSOLE_MESSAGE_SOURCE_JAVASCRIPT ; case JSC :: MessageSource :: Network : return WEBKIT_CONSOLE_MESSAGE_SOURCE_NETWORK ; case JSC :: MessageSource :: ConsoleAPI : return WEBKIT_CONSOLE_MESSAGE_SOURCE_CONSOLE_API ; case JSC :: MessageSource :: Security : return WEBKIT_CONSOLE_MESSAGE_SOURCE_SECURITY ; case JSC :: MessageSource :: Other : default : break ; } return WEBKIT_CONSOLE_MESSAGE_SOURCE_OTHER ; }
webkit_console_message_get_source:
 @console_message: a #WebKitConsoleMessage
webkit_console_message_get_source : @console_message : a #WebKitConsoleMessage