2003-06-30 16:44:03 +04:00
|
|
|
/*
|
2009-07-24 03:05:34 +04:00
|
|
|
* Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org>
|
2007-08-08 20:16:03 +04:00
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2003-04-04 19:19:32 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <assert.h>
|
2009-07-24 03:05:34 +04:00
|
|
|
|
|
|
|
#include <libwapcaplet/libwapcaplet.h>
|
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
#include "content/content_protected.h"
|
2007-05-31 02:39:54 +04:00
|
|
|
#include "content/fetch.h"
|
2010-03-28 16:56:39 +04:00
|
|
|
#include "content/hlcache.h"
|
2007-05-31 02:39:54 +04:00
|
|
|
#include "css/css.h"
|
2009-07-24 03:05:34 +04:00
|
|
|
#include "css/internal.h"
|
2007-05-31 02:39:54 +04:00
|
|
|
#include "desktop/gui.h"
|
2009-07-24 03:05:34 +04:00
|
|
|
#include "render/html.h"
|
2010-03-28 16:56:39 +04:00
|
|
|
#include "utils/http.h"
|
2009-07-26 01:42:27 +04:00
|
|
|
#include "utils/messages.h"
|
2005-05-22 03:30:19 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
static nserror nscss_import(hlcache_handle *handle,
|
|
|
|
const hlcache_event *event, void *pw);
|
2005-05-22 03:30:19 +04:00
|
|
|
|
2005-01-16 03:03:45 +03:00
|
|
|
/**
|
2009-07-24 03:05:34 +04:00
|
|
|
* Allocation callback for libcss
|
2005-01-16 03:03:45 +03:00
|
|
|
*
|
2009-07-24 03:05:34 +04:00
|
|
|
* \param ptr Pointer to reallocate, or NULL for new allocation
|
|
|
|
* \param size Number of bytes requires
|
|
|
|
* \param pw Allocation context
|
|
|
|
* \return Pointer to allocated block, or NULL on failure
|
2005-01-16 03:03:45 +03:00
|
|
|
*/
|
2009-07-24 03:05:34 +04:00
|
|
|
static void *myrealloc(void *ptr, size_t size, void *pw)
|
2005-01-16 03:03:45 +03:00
|
|
|
{
|
2009-07-24 03:05:34 +04:00
|
|
|
return realloc(ptr, size);
|
2005-01-16 03:03:45 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-07-24 03:05:34 +04:00
|
|
|
* Initialise a CSS content
|
2005-01-16 03:03:45 +03:00
|
|
|
*
|
2009-07-24 03:05:34 +04:00
|
|
|
* \param c Content to initialise
|
|
|
|
* \param params Content-Type parameters
|
|
|
|
* \return true on success, false on failure
|
2005-01-16 03:03:45 +03:00
|
|
|
*/
|
2010-03-28 16:56:39 +04:00
|
|
|
bool nscss_create(struct content *c, const http_parameter *params)
|
2005-01-16 03:03:45 +03:00
|
|
|
{
|
2009-07-27 17:56:05 +04:00
|
|
|
const char *charset = NULL;
|
2009-07-26 01:42:27 +04:00
|
|
|
union content_msg_data msg_data;
|
2010-03-28 16:56:39 +04:00
|
|
|
nserror error;
|
2005-05-22 03:30:19 +04:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
/** \todo what happens about the allocator? */
|
2009-07-26 01:42:27 +04:00
|
|
|
/** \todo proper error reporting */
|
2005-01-16 03:48:47 +03:00
|
|
|
|
2009-07-27 17:56:05 +04:00
|
|
|
/* Find charset specified on HTTP layer, if any */
|
2010-03-28 16:56:39 +04:00
|
|
|
error = http_parameter_list_find_item(params, "charset", &charset);
|
|
|
|
if (error != NSERROR_OK) {
|
|
|
|
/* No charset specified, use fallback, if any */
|
|
|
|
/** \todo libcss will take this as gospel, which is wrong */
|
|
|
|
charset = c->fallback_charset;
|
2009-07-27 17:56:05 +04:00
|
|
|
}
|
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
if (nscss_create_css_data(&c->data.css, content__get_url(c),
|
|
|
|
charset, c->quirks) != NSERROR_OK) {
|
|
|
|
msg_data.error = messages_get("NoMemory");
|
|
|
|
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
|
|
|
|
return false;
|
2005-01-17 00:39:21 +03:00
|
|
|
}
|
2005-05-22 03:30:19 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
return true;
|
|
|
|
}
|
2005-01-17 00:39:21 +03:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
/**
|
|
|
|
* Create a struct content_css_data, creating a stylesheet object
|
|
|
|
*
|
|
|
|
* \param c Struct to populate
|
|
|
|
* \param url URL of stylesheet
|
|
|
|
* \param charset Stylesheet charset
|
|
|
|
* \param quirks Stylesheet quirks mode
|
|
|
|
* \return NSERROR_OK on success, NSERROR_NOMEM on memory exhaustion
|
|
|
|
*/
|
|
|
|
nserror nscss_create_css_data(struct content_css_data *c,
|
|
|
|
const char *url, const char *charset, bool quirks)
|
|
|
|
{
|
|
|
|
css_error error;
|
2003-04-04 19:19:32 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
c->import_count = 0;
|
|
|
|
c->imports = NULL;
|
2009-07-24 03:05:34 +04:00
|
|
|
|
2009-07-27 17:56:05 +04:00
|
|
|
error = css_stylesheet_create(CSS_LEVEL_21, charset,
|
2010-03-28 16:56:39 +04:00
|
|
|
url, NULL, quirks, false,
|
2009-07-24 03:05:34 +04:00
|
|
|
myrealloc, NULL,
|
|
|
|
nscss_resolve_url, NULL,
|
2010-03-28 16:56:39 +04:00
|
|
|
&c->sheet);
|
2009-07-24 03:05:34 +04:00
|
|
|
if (error != CSS_OK) {
|
2010-03-28 16:56:39 +04:00
|
|
|
return NSERROR_NOMEM;
|
2009-07-24 03:05:34 +04:00
|
|
|
}
|
2005-01-05 23:22:57 +03:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
return NSERROR_OK;
|
2003-04-04 19:19:32 +04:00
|
|
|
}
|
|
|
|
|
2004-05-01 21:48:38 +04:00
|
|
|
/**
|
2009-07-24 03:05:34 +04:00
|
|
|
* Process CSS source data
|
2004-05-01 21:48:38 +04:00
|
|
|
*
|
2009-07-24 03:05:34 +04:00
|
|
|
* \param c Content structure
|
|
|
|
* \param data Data to process
|
|
|
|
* \param size Number of bytes to process
|
|
|
|
* \return true on success, false on failure
|
2004-05-01 21:48:38 +04:00
|
|
|
*/
|
2009-07-24 03:05:34 +04:00
|
|
|
bool nscss_process_data(struct content *c, char *data, unsigned int size)
|
2003-04-04 19:19:32 +04:00
|
|
|
{
|
2009-07-26 01:42:27 +04:00
|
|
|
union content_msg_data msg_data;
|
2009-07-24 03:05:34 +04:00
|
|
|
css_error error;
|
2003-04-04 19:19:32 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
error = nscss_process_css_data(&c->data.css, data, size);
|
2009-07-26 01:42:27 +04:00
|
|
|
if (error != CSS_OK && error != CSS_NEEDDATA) {
|
|
|
|
msg_data.error = "?";
|
|
|
|
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
|
|
|
|
}
|
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
return (error == CSS_OK || error == CSS_NEEDDATA);
|
2004-05-01 21:48:38 +04:00
|
|
|
}
|
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
/**
|
|
|
|
* Process CSS data
|
|
|
|
*
|
|
|
|
* \param c CSS content object
|
|
|
|
* \param data Data to process
|
|
|
|
* \param size Number of bytes to process
|
|
|
|
* \return CSS_OK on success, appropriate error otherwise
|
|
|
|
*/
|
|
|
|
css_error nscss_process_css_data(struct content_css_data *c, char *data,
|
|
|
|
unsigned int size)
|
|
|
|
{
|
|
|
|
return css_stylesheet_append_data(c->sheet,
|
|
|
|
(const uint8_t *) data, size);
|
|
|
|
}
|
|
|
|
|
2004-05-01 21:48:38 +04:00
|
|
|
/**
|
2009-07-24 03:05:34 +04:00
|
|
|
* Convert a CSS content ready for use
|
2004-05-01 21:48:38 +04:00
|
|
|
*
|
2009-07-24 03:05:34 +04:00
|
|
|
* \param c Content to convert
|
|
|
|
* \param w Width of area content will be displayed in
|
|
|
|
* \param h Height of area content will be displayed in
|
|
|
|
* \return true on success, false on failure
|
2004-05-01 21:48:38 +04:00
|
|
|
*/
|
2009-07-24 03:05:34 +04:00
|
|
|
bool nscss_convert(struct content *c, int w, int h)
|
2003-04-06 22:09:34 +04:00
|
|
|
{
|
2009-07-26 01:42:27 +04:00
|
|
|
union content_msg_data msg_data;
|
2009-07-27 23:40:55 +04:00
|
|
|
uint32_t i;
|
|
|
|
size_t size;
|
2009-07-24 03:05:34 +04:00
|
|
|
css_error error;
|
2003-04-06 22:09:34 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
error = nscss_convert_css_data(&c->data.css, w, h);
|
|
|
|
if (error != CSS_OK) {
|
|
|
|
msg_data.error = "?";
|
|
|
|
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
|
|
|
|
c->status = CONTENT_STATUS_ERROR;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Retrieve the size of this sheet */
|
|
|
|
error = css_stylesheet_size(c->data.css.sheet, &size);
|
|
|
|
if (error != CSS_OK) {
|
|
|
|
msg_data.error = "?";
|
|
|
|
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
|
|
|
|
c->status = CONTENT_STATUS_ERROR;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
c->size += size;
|
|
|
|
|
|
|
|
/* Add on the size of the imported sheets */
|
|
|
|
for (i = 0; i < c->data.css.import_count; i++) {
|
|
|
|
struct content *import = hlcache_handle_get_content(
|
|
|
|
c->data.css.imports[i].c);
|
|
|
|
|
|
|
|
if (import != NULL) {
|
|
|
|
c->size += import->size;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
c->status = CONTENT_STATUS_DONE;
|
|
|
|
|
|
|
|
return error == CSS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Convert CSS data ready for use
|
|
|
|
*
|
|
|
|
* \param c CSS data to convert
|
|
|
|
* \param w Width of area content will be displayed in
|
|
|
|
* \param h Height of area content will be displayed in
|
|
|
|
* \return CSS error
|
|
|
|
*/
|
|
|
|
css_error nscss_convert_css_data(struct content_css_data *c, int w, int h)
|
|
|
|
{
|
|
|
|
const char *referer;
|
|
|
|
uint32_t i = 0;
|
|
|
|
css_error error;
|
|
|
|
nserror nerror;
|
|
|
|
|
|
|
|
error = css_stylesheet_get_url(c->sheet, &referer);
|
|
|
|
if (error != CSS_OK) {
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
error = css_stylesheet_data_done(c->sheet);
|
2003-04-06 22:09:34 +04:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
/* Process pending imports */
|
|
|
|
while (error == CSS_IMPORTS_PENDING) {
|
2010-03-28 16:56:39 +04:00
|
|
|
hlcache_child_context child;
|
2009-07-27 17:49:10 +04:00
|
|
|
struct nscss_import *imports;
|
2009-07-24 03:05:34 +04:00
|
|
|
lwc_string *uri;
|
|
|
|
uint64_t media;
|
|
|
|
css_stylesheet *sheet;
|
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
error = css_stylesheet_next_pending_import(c->sheet,
|
2009-07-24 03:05:34 +04:00
|
|
|
&uri, &media);
|
|
|
|
if (error != CSS_OK && error != CSS_INVALID) {
|
2010-03-28 16:56:39 +04:00
|
|
|
return error;
|
2009-07-24 03:05:34 +04:00
|
|
|
}
|
2004-05-01 21:48:38 +04:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
/* Give up if there are no more imports */
|
|
|
|
if (error == CSS_INVALID) {
|
|
|
|
error = CSS_OK;
|
2003-04-06 22:09:34 +04:00
|
|
|
break;
|
2009-07-24 03:05:34 +04:00
|
|
|
}
|
2003-04-06 22:09:34 +04:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
/* Increase space in table */
|
2010-03-28 16:56:39 +04:00
|
|
|
imports = realloc(c->imports, (c->import_count + 1) *
|
2009-07-27 17:49:10 +04:00
|
|
|
sizeof(struct nscss_import));
|
2009-07-24 03:05:34 +04:00
|
|
|
if (imports == NULL) {
|
2010-03-28 16:56:39 +04:00
|
|
|
return CSS_NOMEM;
|
2003-04-06 22:09:34 +04:00
|
|
|
}
|
2010-03-28 16:56:39 +04:00
|
|
|
c->imports = imports;
|
2009-07-24 03:05:34 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
/** \todo fallback charset */
|
|
|
|
child.charset = NULL;
|
|
|
|
error = css_stylesheet_quirks_allowed(c->sheet, &child.quirks);
|
|
|
|
if (error != CSS_OK) {
|
|
|
|
return error;
|
2003-04-06 22:09:34 +04:00
|
|
|
}
|
2009-02-10 21:35:56 +03:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
/* Create content */
|
|
|
|
i = c->import_count;
|
|
|
|
c->imports[c->import_count].media = media;
|
|
|
|
nerror = hlcache_handle_retrieve(lwc_string_data(uri),
|
|
|
|
0, referer, NULL, w, h, nscss_import, c,
|
|
|
|
&child, &c->imports[c->import_count++].c);
|
|
|
|
if (error != NSERROR_OK) {
|
|
|
|
return CSS_NOMEM;
|
|
|
|
}
|
2009-07-24 03:05:34 +04:00
|
|
|
|
|
|
|
/* Wait for import to fetch + convert */
|
2010-03-28 16:56:39 +04:00
|
|
|
/** \todo This blocking approach needs to die */
|
|
|
|
while (c->imports[i].c != NULL &&
|
|
|
|
content_get_status(c->imports[i].c) !=
|
|
|
|
CONTENT_STATUS_DONE) {
|
2010-03-28 20:00:54 +04:00
|
|
|
llcache_poll();
|
2009-07-24 03:05:34 +04:00
|
|
|
gui_multitask();
|
|
|
|
}
|
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
if (c->imports[i].c != NULL) {
|
|
|
|
struct content *s = hlcache_handle_get_content(
|
|
|
|
c->imports[i].c);
|
|
|
|
sheet = s->data.css.sheet;
|
2009-07-24 03:05:34 +04:00
|
|
|
} else {
|
|
|
|
error = css_stylesheet_create(CSS_LEVEL_DEFAULT,
|
2010-03-28 16:56:39 +04:00
|
|
|
NULL, "", NULL, false, false,
|
2009-07-24 03:05:34 +04:00
|
|
|
myrealloc, NULL,
|
|
|
|
nscss_resolve_url, NULL,
|
|
|
|
&sheet);
|
|
|
|
if (error != CSS_OK) {
|
2010-03-28 16:56:39 +04:00
|
|
|
return error;
|
2003-06-17 23:24:21 +04:00
|
|
|
}
|
2009-07-24 03:05:34 +04:00
|
|
|
}
|
2003-06-17 23:24:21 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
error = css_stylesheet_register_import(c->sheet, sheet);
|
2009-07-24 03:05:34 +04:00
|
|
|
if (error != CSS_OK) {
|
2010-03-28 16:56:39 +04:00
|
|
|
return error;
|
2009-07-24 03:05:34 +04:00
|
|
|
}
|
2009-02-22 18:13:10 +03:00
|
|
|
|
2009-07-24 03:05:34 +04:00
|
|
|
error = CSS_IMPORTS_PENDING;
|
|
|
|
}
|
2003-06-17 23:24:21 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
return error;
|
2003-04-06 22:09:34 +04:00
|
|
|
}
|
|
|
|
|
2004-08-05 05:57:14 +04:00
|
|
|
/**
|
2009-07-24 03:05:34 +04:00
|
|
|
* Clean up a CSS content
|
2005-05-22 03:30:19 +04:00
|
|
|
*
|
2009-07-24 03:05:34 +04:00
|
|
|
* \param c Content to clean up
|
2004-08-05 05:57:14 +04:00
|
|
|
*/
|
2009-07-24 03:05:34 +04:00
|
|
|
void nscss_destroy(struct content *c)
|
2010-03-28 16:56:39 +04:00
|
|
|
{
|
|
|
|
nscss_destroy_css_data(&c->data.css);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Clean up CSS data
|
|
|
|
*
|
|
|
|
* \param c CSS data to clean up
|
|
|
|
*/
|
|
|
|
void nscss_destroy_css_data(struct content_css_data *c)
|
2004-08-05 05:57:14 +04:00
|
|
|
{
|
2009-07-24 03:05:34 +04:00
|
|
|
uint32_t i;
|
2005-05-22 03:30:19 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
for (i = 0; i < c->import_count; i++) {
|
|
|
|
if (c->imports[i].c != NULL) {
|
|
|
|
hlcache_handle_release(c->imports[i].c);
|
2005-05-22 03:30:19 +04:00
|
|
|
}
|
2010-03-28 16:56:39 +04:00
|
|
|
c->imports[i].c = NULL;
|
2004-08-05 05:57:14 +04:00
|
|
|
}
|
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
free(c->imports);
|
2004-08-05 05:57:14 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
if (c->sheet != NULL) {
|
|
|
|
css_stylesheet_destroy(c->sheet);
|
|
|
|
c->sheet = NULL;
|
2005-05-22 03:30:19 +04:00
|
|
|
}
|
2010-03-28 16:56:39 +04:00
|
|
|
}
|
2005-05-22 03:30:19 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
/**
|
|
|
|
* Retrieve imported stylesheets
|
|
|
|
*
|
|
|
|
* \param h Stylesheet containing imports
|
|
|
|
* \param n Pointer to location to receive number of imports
|
|
|
|
* \return Pointer to array of imported stylesheets
|
|
|
|
*/
|
|
|
|
struct nscss_import *nscss_get_imports(hlcache_handle *h, uint32_t *n)
|
|
|
|
{
|
|
|
|
struct content *c = hlcache_handle_get_content(h);
|
|
|
|
|
|
|
|
assert(c != NULL);
|
|
|
|
assert(c->type == CONTENT_CSS);
|
|
|
|
assert(n != NULL);
|
|
|
|
|
|
|
|
*n = c->data.css.import_count;
|
|
|
|
|
|
|
|
return c->data.css.imports;
|
2004-08-05 05:57:14 +04:00
|
|
|
}
|
|
|
|
|
2003-09-28 03:36:34 +04:00
|
|
|
/**
|
2010-03-28 16:56:39 +04:00
|
|
|
* Handler for imported stylesheet events
|
2004-05-01 21:48:38 +04:00
|
|
|
*
|
2010-03-28 16:56:39 +04:00
|
|
|
* \param handle Handle for stylesheet
|
|
|
|
* \param event Event object
|
|
|
|
* \param pw Callback context
|
|
|
|
* \return NSERROR_OK on success, appropriate error otherwise
|
2003-09-28 03:36:34 +04:00
|
|
|
*/
|
2010-03-28 16:56:39 +04:00
|
|
|
nserror nscss_import(hlcache_handle *handle,
|
|
|
|
const hlcache_event *event, void *pw)
|
2003-09-28 03:36:34 +04:00
|
|
|
{
|
2010-03-28 16:56:39 +04:00
|
|
|
struct content_css_data *parent = pw;
|
|
|
|
uint32_t i = 0;
|
2004-08-05 05:57:14 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
switch (event->type) {
|
2009-07-24 03:05:34 +04:00
|
|
|
case CONTENT_MSG_LOADING:
|
2010-03-28 16:56:39 +04:00
|
|
|
if (content_get_type(handle) != CONTENT_CSS) {
|
|
|
|
hlcache_handle_release(handle);
|
2004-08-05 05:57:14 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
for (i = 0; i < parent->import_count; i++) {
|
|
|
|
if (parent->imports[i].c == handle) {
|
|
|
|
parent->imports[i].c = NULL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2009-07-24 03:05:34 +04:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case CONTENT_MSG_READY:
|
|
|
|
break;
|
|
|
|
case CONTENT_MSG_DONE:
|
|
|
|
break;
|
|
|
|
case CONTENT_MSG_ERROR:
|
2010-03-28 16:56:39 +04:00
|
|
|
hlcache_handle_release(handle);
|
|
|
|
for (i = 0; i < parent->import_count; i++) {
|
|
|
|
if (parent->imports[i].c == handle) {
|
|
|
|
parent->imports[i].c = NULL;
|
|
|
|
break;
|
|
|
|
}
|
2009-07-24 03:05:34 +04:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case CONTENT_MSG_STATUS:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
assert(0);
|
2005-05-22 03:30:19 +04:00
|
|
|
}
|
2010-03-28 16:56:39 +04:00
|
|
|
|
|
|
|
return NSERROR_OK;
|
2003-09-28 03:36:34 +04:00
|
|
|
}
|
2003-04-06 22:09:34 +04:00
|
|
|
|