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_COMMAND_H_
00031 #define _SML_COMMAND_H_
00032
00033 SmlStatus *smlStatusNew(SmlErrorType data, unsigned int cmdref, unsigned int msgref, SmlLocation *sourceref, SmlLocation *targeref, SmlCommandType type, SmlError **error);
00034 SmlStatus *smlStatusRef(SmlStatus *status);
00035 void smlStatusUnref(SmlStatus *status);
00036 SmlErrorType smlStatusGetCode(SmlStatus *status);
00037 SmlErrorClass smlStatusGetClass(SmlStatus *status);
00038 SmlCommand *smlStatusGetResult(SmlStatus *status);
00039 SmlBool smlStatusIsResult(SmlStatus *status);
00040
00041 SmlCommand *smlCommandNew(SmlCommandType type, SmlError **error);
00042 SmlStatus *smlCommandNewReply(const SmlCommand *cmd, SmlErrorType code, SmlError **error);
00043 SmlCommand *smlCommandRef(SmlCommand *cmd);
00044 void smlCommandUnref(SmlCommand *cmd);
00045
00046 SmlCommand *smlCommandNewAlert(SmlAlertType type, SmlLocation *target, SmlLocation *source, const char *next, const char *last, const char *contenttype, SmlError **error);
00047 SmlCommand *smlCommandNewSync(SmlLocation *target, SmlLocation *source, unsigned int num_changes, SmlError **error);
00048 SmlCommand *smlCommandNewChange(SmlChangeType type, const char *uid, const char *data, unsigned int size, const char *contenttype, SmlError **error);
00049 SmlCommand *smlCommandNewPartialChange(SmlChangeType type, const char *uid, const char *data, unsigned int complete_size, unsigned int partial_size, const char *contenttype, SmlError **error);
00050 SmlCommand *smlCommandNewResult(SmlCommand *cmd, SmlLocation *source, char *data, unsigned int size, const char *contenttype, SmlError **error);
00051 SmlCommand *smlCommandNewPut(SmlLocation *target, SmlLocation *source, const char *data, unsigned int size, const char *contenttype, SmlError **error);
00052 SmlCommand *smlCommandNewGet(SmlLocation *target, const char *contenttype, SmlError **error);
00053
00054 SmlCommand *smlCommandNewMap(SmlLocation *target, SmlLocation *source, SmlError **error);
00055 SmlBool smlCommandAddMapItem(SmlCommand *map, SmlMapItem *item, SmlError **error);
00056
00057 #endif //_SML_COMMAND_H_
00058