/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/*
* This file is part of The Croco Library
*
* modify it under the terms of version 2.1 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program 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 Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* See COPRYRIGHTS file for copyright information.
*/
#include <string.h>
#include "cr-doc-handler.h"
#include "cr-parser.h"
/**
*@CRDocHandler:
*
*The definition of the CRDocHandler class.
*Contains methods to instantiate, destroy,
*and initialyze instances of #CRDocHandler
*to custom values.
*/
struct _CRDocHandlerPriv {
/**
*This pointer is to hold an application parsing context.
*For example, it used by the Object Model parser to
*store it parsing context. #CRParser does not touch it, but
*#CROMParser does. #CROMParser allocates this pointer at
*the beginning of the css document, and frees it at the end
*of the document.
*/
/**
*The place where #CROMParser puts the result of its parsing, if
*any.
*/
/**
*a pointer to the parser used to parse
*the current document.
*/
};
/**
* cr_doc_handler_new:
*Constructor of #CRDocHandler.
*
*Returns the newly built instance of
*#CRDocHandler
*
*/
cr_doc_handler_new (void)
{
cr_utils_trace_info ("Out of memory exception");
return NULL;
}
return result;
}
/**
* cr_doc_handler_get_ctxt:
*@a_this: the current instance of #CRDocHandler.
*@a_ctxt: out parameter. The new parsing context.
*
*Gets the private parsing context associated to the document handler
*The private parsing context is used by libcroco only.
*
*Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_doc_handler_set_ctxt:
*@a_this: the current instance of #CRDocHandler
*@a_ctxt: a pointer to the parsing context.
*
*Sets the private parsing context.
*This is used by libcroco only.
*Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_doc_handler_get_result:
*@a_this: the current instance of #CRDocHandler
*@a_result: out parameter. The returned result.
*
*Gets the private parsing result.
*The private parsing result is used by libcroco only.
*
*Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_doc_handler_set_result:
*@a_this: the current instance of #CRDocHandler
*@a_result: the new result.
*
*Sets the private parsing context.
*This is used by libcroco only.
*
*Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
*cr_doc_handler_set_default_sac_handler:
*@a_this: a pointer to the current instance of #CRDocHandler.
*
*Sets the sac handlers contained in the current
*instance of DocHandler to the default handlers.
*For the time being the default handlers are
*test handlers. This is expected to change in a
*near future, when the libcroco gets a bit debugged.
*
*Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_doc_handler_ref:
*@a_this: the current instance of #CRDocHandler.
*/
void
{
}
/**
* cr_doc_handler_unref:
*@a_this: the currrent instance of #CRDocHandler.
*
*Decreases the ref count of the current instance of #CRDocHandler.
*If the ref count reaches '0' then, destroys the instance.
*
*Returns TRUE if the instance as been destroyed, FALSE otherwise.
*/
{
}
return TRUE;
}
return FALSE ;
}
/**
* cr_doc_handler_destroy:
*@a_this: the instance of #CRDocHandler to
*destroy.
*
*The destructor of the #CRDocHandler class.
*/
void
{
}
}
/**
* cr_doc_handler_associate_a_parser:
*Associates a parser to the current document handler
*
*@a_this: the current instance of document handler.
*@a_parser: the parser to associate.
*/
void
{
&& a_parser) ;
}