00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00029
00030 #ifndef _SML_ELEMENTS_H_
00031 #define _SML_ELEMENTS_H_
00032
00033 SmlLocation *smlLocationNew (const char *locURI, const char *locName, SmlError **error);
00034 SmlLocation *smlLocationRef (SmlLocation *loc);
00035 void smlLocationUnref (SmlLocation *loc);
00036
00037 const char *smlLocationGetURI (SmlLocation *loc);
00038 const char *smlLocationGetName (SmlLocation *loc);
00039 void smlLocationSetName(SmlLocation *loc, const char *name);
00040 void smlLocationCopy (SmlLocation *source, SmlLocation *target);
00041 SmlLocation *smlLocationClone (SmlLocation *source, SmlError **error);
00042 SmlBool smlLocationCompare (SmlLocation *objectroot, SmlLocation *object, SmlLocation *urlroot, SmlLocation *url);
00043 SmlBool smlLocationIsRelative (SmlLocation *location);
00044
00045 SmlCred *smlCredNewFromString(const char *type, const char *format, const char *data, SmlError **error);
00046 SmlCred *smlCredNewAuth(SmlAuthType type, const char *username, const char *password, SmlError **error);
00047 SmlCred *smlCredNew(SmlAuthType type, SmlFormatType format, const char *data, const char*username, SmlError **error);
00048 void smlCredRef(SmlCred *cred);
00049 void smlCredUnref(SmlCred *cred);
00050 void smlCredFree(SmlCred *cred) LIBSYNCML_DEPRECATED;
00051
00052 SmlAnchor *smlAnchorNew(const char *last, const char *next, SmlError **error);
00053 void smlAnchorFree(SmlAnchor *anchor);
00054
00055 SmlItem *smlItemNew(unsigned int size, SmlError **error);
00056 SmlItem *smlItemNewForData(const char *data, unsigned int size, SmlError **error);
00057 SmlItem *smlItemRef(SmlItem *item);
00058 void smlItemUnref(SmlItem *item);
00059 SmlBool smlItemAddData(SmlItem *item, const char *data, unsigned int size, SmlError **error);
00060 SmlBool smlItemCheck(SmlItem *item);
00061 SmlBool smlItemHasData(SmlItem *item);
00062 SmlBool smlItemGetData(SmlItem *item, char **data, unsigned int *size, SmlError **error);
00063 SmlBool smlItemStealData(SmlItem *item, char **data, unsigned int *size, SmlError **error);
00064
00065 void smlItemSetSource(SmlItem *item, SmlLocation *source);
00066 SmlLocation *smlItemGetSource(SmlItem *item);
00067 void smlItemSetTarget(SmlItem *item, SmlLocation *target);
00068 SmlLocation *smlItemGetTarget(SmlItem *item);
00069 void smlItemSetSourceParent(SmlItem *item, SmlLocation *sourceParent);
00070 SmlLocation *smlItemGetSourceParent(SmlItem *item);
00071 void smlItemSetTargetParent(SmlItem *item, SmlLocation *targeParent);
00072 SmlLocation *smlItemGetTargetParent(SmlItem *item);
00073 void smlItemSetRaw(SmlItem *item, SmlBool raw);
00074
00075 void smlHeaderFree(SmlHeader *header);
00076
00077 SmlChal *smlChalNew(SmlAuthType type, SmlError **error);
00078 SmlChal *smlChalNewFromBinary(SmlAuthType type, const char *nonce, size_t length, SmlError **error);
00079 SmlChal *smlChalNewFromBase64(SmlAuthType type, const char *nonce, SmlError **error);
00080 void smlChalRef(SmlChal *chal);
00081 void smlChalUnref(SmlChal *chal);
00082 void smlChalFree(SmlChal *chal) LIBSYNCML_DEPRECATED;
00083
00084 SmlMapItem *smlMapItemNew(const char *uid, const char *newuid, SmlError **error);
00085 SmlMapItem *smlMapItemRef(SmlMapItem *item);
00086 void smlMapItemUnref(SmlMapItem *item);
00087
00088 #endif //_SML_ELEMENTS_H_
00089