libsyncml  0.5.4
transport_http_server.c
1 /*
2  * libsyncml - A syncml protocol implementation
3  * Copyright (C) 2008-2009 Michael Bell <michael.bell@opensync.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  */
20 
21 #include "transport.h"
22 #include "libsyncml/sml_error_internals.h"
23 #include "libsyncml/sml_support.h"
24 
25 SmlBool smlDataSyncTransportHttpServerInit(
26  SmlDataSyncObject *dsObject,
27  SmlError **error)
28 {
29  smlTrace(TRACE_ENTRY, "%s(%p, %p)", __func__, dsObject, error);
30  CHECK_ERROR_REF
31 
32  if (dsObject->url != NULL &&
34  dsObject->tsp,
35  SML_TRANSPORT_CONFIG_URL, dsObject->url,
36  error))
37  goto error;
38 
39  smlTrace(TRACE_EXIT, "%s - TRUE", __func__);
40  return TRUE;
41 error:
42  smlTrace(TRACE_EXIT_ERROR, "%s - %s", __func__, smlErrorPrint(error));
43  return FALSE;
44 }
45 
SmlBool smlTransportSetConfigOption(SmlTransport *tsp, const char *name, const char *value, SmlError **error)
Sets a configuration parameter.
const char * smlErrorPrint(SmlError **error)
Returns the message of the error.
Definition: sml_error.c:299
This is the central synchronization object.
Definition: data_sync.h:110
void smlTrace(SmlTraceType type, const char *message,...)
Used for tracing the application.
Definition: sml_support.c:120
Represent an error.