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_DEVINF_H_
00031 #define _SML_DEVINF_H_
00032
00033 SmlDevInfDevTyp smlDevInfDevTypeFromString(const char *name, SmlError **error);
00034 const char *smlDevInfDevTypeToString(SmlDevInfDevTyp type, SmlError **error);
00035
00036 SmlDevInf *smlDevInfNew(const char *devid, SmlDevInfDevTyp devtyp, SmlError **error);
00037 SmlDevInf *smlDevInfRef(SmlDevInf *devinf);
00038 void smlDevInfUnref(SmlDevInf *devinf);
00039
00040 const char *smlDevInfGetManufacturer(SmlDevInf *devinf);
00041 void smlDevInfSetManufacturer(SmlDevInf *devinf, const char *man);
00042 const char *smlDevInfGetModel(SmlDevInf *devinf);
00043 void smlDevInfSetModel(SmlDevInf *devinf, const char *model);
00044 const char *smlDevInfGetOEM(SmlDevInf *devinf);
00045 void smlDevInfSetOEM(SmlDevInf *devinf, const char *oem);
00046 const char *smlDevInfGetFirmwareVersion(SmlDevInf *devinf);
00047 void smlDevInfSetFirmwareVersion(SmlDevInf *devinf, const char *firmwareVersion);
00048 const char *smlDevInfGetSoftwareVersion(SmlDevInf *devinf);
00049 void smlDevInfSetSoftwareVersion(SmlDevInf *devinf, const char *softwareVersion);
00050 const char *smlDevInfGetHardwareVersion(SmlDevInf *devinf);
00051 void smlDevInfSetHardwareVersion(SmlDevInf *devinf, const char *hardwareVersion);
00052 const char *smlDevInfGetDeviceID(SmlDevInf *devinf);
00053 void smlDevInfSetDeviceID(SmlDevInf *devinf, const char *devid);
00054 SmlDevInfDevTyp smlDevInfGetDeviceType(SmlDevInf *devinf);
00055 void smlDevInfSetDeviceType(SmlDevInf *devinf, SmlDevInfDevTyp devtyp);
00056 SmlBool smlDevInfSupportsUTC(SmlDevInf *devinf);
00057 void smlDevInfSetSupportsUTC(SmlDevInf *devinf, SmlBool supports);
00058 SmlBool smlDevInfSupportsLargeObjs(SmlDevInf *devinf);
00059 void smlDevInfSetSupportsLargeObjs(SmlDevInf *devinf, SmlBool supports);
00060 SmlBool smlDevInfSupportsNumberOfChanges(SmlDevInf *devinf);
00061 void smlDevInfSetSupportsNumberOfChanges(SmlDevInf *devinf, SmlBool supports);
00062
00063 void smlDevInfAddDataStore(SmlDevInf *devinf, SmlDevInfDataStore *datastore);
00064 unsigned int smlDevInfNumDataStores(SmlDevInf *devinf);
00065 const SmlDevInfDataStore *smlDevInfGetNthDataStore(const SmlDevInf *devinf, unsigned int nth);
00066
00067 SmlDevInfDataStore *smlDevInfDataStoreNew(const char *sourceRef, SmlError **error);
00068 SmlDevInfDataStore *smlDevInfDataStoreRef(SmlDevInfDataStore *datastore);
00069 void smlDevInfDataStoreUnref(SmlDevInfDataStore *datastore);
00070
00071 const char *smlDevInfDataStoreGetSourceRef(const SmlDevInfDataStore *datastore);
00072 void smlDevInfDataStoreSetSourceRef(SmlDevInfDataStore *datastore, const char *sourceref);
00073 const char *smlDevInfDataStoreGetDisplayName(const SmlDevInfDataStore *datastore);
00074 void smlDevInfDataStoreSetDisplayName(SmlDevInfDataStore *datastore, const char *displayName);
00075 unsigned int smlDevInfGetMaxGUIDSize(const SmlDevInfDataStore *datastore);
00076 void smlDevInfSetMaxGUIDSize(SmlDevInfDataStore *datastore, unsigned int max);
00077
00078 void smlDevInfDataStoreSetRxPref(SmlDevInfDataStore *datastore, const char *contenttype, const char *version);
00079 SmlBool smlDevInfDataStoreGetRxPref(const SmlDevInfDataStore *datastore, char **contenttype, char **version);
00080 void smlDevInfDataStoreAddRx(SmlDevInfDataStore *datastore, SmlDevInfContentType *ct);
00081 unsigned int smlDevInfDataStoreNumRx(const SmlDevInfDataStore *datastore);
00082 const SmlDevInfContentType *smlDevInfDataStoreGetNthRx(const SmlDevInfDataStore *datastore, unsigned int n);
00083 void smlDevInfDataStoreSetTxPref(SmlDevInfDataStore *datastore, const char *contenttype, const char *version);
00084 SmlBool smlDevInfDataStoreGetTxPref(const SmlDevInfDataStore *datastore, char **contenttype, char **version);
00085 void smlDevInfDataStoreAddTx(SmlDevInfDataStore *datastore, SmlDevInfContentType *ct);
00086 unsigned int smlDevInfDataStoreNumTx(const SmlDevInfDataStore *datastore);
00087 const SmlDevInfContentType *smlDevInfDataStoreGetNthTx(const SmlDevInfDataStore *datastore, unsigned int n);
00088
00089 void smlDevInfDataStoreSetMemory(SmlDevInfDataStore *datastore, SmlBool shared, unsigned int maxid, unsigned int maxmem);
00090 void smlDevInfDataStoreGetMemory(const SmlDevInfDataStore *datastore, SmlBool *shared, unsigned int *maxid, unsigned int *maxmem);
00091 void smlDevInfDataStoreSetSyncCap(SmlDevInfDataStore *datastore, SmlDevInfSyncCap cap, SmlBool supported);
00092 SmlBool smlDevInfDataStoreGetSyncCap(const SmlDevInfDataStore *datastore, SmlDevInfSyncCap cap);
00093
00094 SmlBool smlDevInfAssemble(SmlDevInf *devinf, char **data, unsigned int *size, SmlError **error);
00095 SmlCommand *smlDevInfNewResult(SmlCommand *cmd, SmlDevInf *devinf, SmlDevInfVersion version, SmlError **error);
00096 SmlCommand *smlDevInfNewPut(SmlDevInf *devinf, SmlDevInfVersion version, SmlError **error);
00097 SmlCommand *smlDevInfNewGet(SmlDevInfVersion version, SmlError **error);
00098
00099 void smlDevInfConfigureSession(SmlDevInf *devinf, SmlSession *session);
00100
00101 SmlDevInf *smlDevInfParse(const char *data, unsigned int length, SmlError **error);
00102 SmlDevInf *smlDevInfFromResult(SmlCommand *result, SmlError **error);
00103
00104 SmlDevInfCTCapType smlDevInfCTCapTypeFromString(const char *name, SmlError **error);
00105 const char *smlDevInfCTCapTypeToString(SmlDevInfCTCapType type, SmlError **error);
00106
00107
00108
00109
00110
00111
00112
00113 SmlDevInfPropParam *smlDevInfNewPropParam(SmlError **error);
00114 void smlDevInfPropParamSetParamName(
00115 SmlDevInfPropParam *propParam,
00116 const char *paramName);
00117 void smlDevInfPropParamSetDataType(
00118 SmlDevInfPropParam *propParam,
00119 const char *dataType);
00120 void smlDevInfPropParamSetDisplayName(
00121 SmlDevInfPropParam *propParam,
00122 const char *displayName);
00123 void smlDevInfPropParamAddValEnum(
00124 SmlDevInfPropParam *propParam,
00125 const char *valEnum);
00126
00127 char *smlDevInfPropParamGetParamName(const SmlDevInfPropParam *propParam);
00128 char *smlDevInfPropParamGetDataType(const SmlDevInfPropParam *propParam);
00129 char *smlDevInfPropParamGetDisplayName(const SmlDevInfPropParam *propParam);
00130 unsigned int smlDevInfPropParamNumValEnums(const SmlDevInfPropParam *propParam);
00131 char *smlDevInfPropParamGetNthValEnum(
00132 const SmlDevInfPropParam *propParam,
00133 unsigned int n);
00134
00135
00136
00137 SmlDevInfProperty *smlDevInfNewProperty(SmlError **error);
00138 void smlDevInfPropertySetPropName(
00139 SmlDevInfProperty *property,
00140 const char *propName);
00141 void smlDevInfPropertySetPropSize(
00142 SmlDevInfProperty *property,
00143 unsigned int propSize);
00144 void smlDevInfPropertySetDataType(
00145 SmlDevInfProperty *property,
00146 const char *dataType);
00147 void smlDevInfPropertySetMaxOccur(
00148 SmlDevInfProperty *property,
00149 unsigned int maxOccur);
00150 void smlDevInfPropertySetMaxSize(
00151 SmlDevInfProperty *property,
00152 unsigned int maxSize);
00153 void smlDevInfPropertySetNoTruncate(
00154 SmlDevInfProperty *property);
00155 void smlDevInfPropertySetDisplayName(
00156 SmlDevInfProperty *property,
00157 const char *displayName);
00158 void smlDevInfPropertyAddValEnum(
00159 SmlDevInfProperty *property,
00160 const char *valEnum);
00161 void smlDevInfPropertyAddPropParam(
00162 SmlDevInfProperty *property,
00163 SmlDevInfPropParam *propParam);
00164
00165 char *smlDevInfPropertyGetPropName(const SmlDevInfProperty *property);
00166 char *smlDevInfPropertyGetDataType(const SmlDevInfProperty *property);
00167 unsigned int smlDevInfPropertyGetMaxOccur(const SmlDevInfProperty *property);
00168 unsigned int smlDevInfPropertyGetMaxSize(const SmlDevInfProperty *property);
00169 SmlBool smlDevInfPropertyGetNoTruncate(const SmlDevInfProperty *property);
00170 char *smlDevInfPropertyGetDisplayName(const SmlDevInfProperty *property);
00171 unsigned int smlDevInfPropertyNumValEnums(const SmlDevInfProperty *property);
00172 char *smlDevInfPropertyGetNthValEnum(
00173 const SmlDevInfProperty *property,
00174 unsigned int n);
00175 unsigned int smlDevInfPropertyNumPropParams(const SmlDevInfProperty *property);
00176 const SmlDevInfPropParam *smlDevInfPropertyGetNthPropParam(
00177 const SmlDevInfProperty *property,
00178 unsigned int n);
00179
00180
00181
00182 SmlDevInfContentType *smlDevInfNewContentType(
00183 const char *cttype,
00184 const char *verct,
00185 SmlError **error);
00186 char *smlDevInfContentTypeGetCTType(const SmlDevInfContentType *ct);
00187 char *smlDevInfContentTypeGetVerCT(const SmlDevInfContentType *ct);
00188 void smlDevInfFreeContentType(SmlDevInfContentType *ct);
00189
00190 SmlDevInfCTCap *smlDevInfNewCTCap(SmlError **error);
00191 void smlDevInfCTCapSetCTType(
00192 SmlDevInfCTCap *ctcap,
00193 const char *cttype);
00194 void smlDevInfCTCapSetVerCT(
00195 SmlDevInfCTCap *ctcap,
00196 const char *verct);
00197 char *smlDevInfCTCapGetCTType(const SmlDevInfCTCap *ctcap);
00198 char *smlDevInfCTCapGetVerCT(const SmlDevInfCTCap *ctcap);
00199 void smlDevInfCTCapAddProperty(
00200 SmlDevInfCTCap *ctcap,
00201 SmlDevInfProperty *property);
00202 void smlDevInfAppendCTCap(SmlDevInf *devinf, SmlDevInfCTCap *ctcap);
00203
00204 const SmlDevInfCTCap *smlDevInfGetCTCap(
00205 const SmlDevInf *devinf,
00206 SmlDevInfContentType *ct);
00207 unsigned int smlDevInfNumCTCaps(const SmlDevInf *devinf);
00208 const SmlDevInfCTCap *smlDevInfGetNthCTCap(
00209 const SmlDevInf *devinf,
00210 unsigned int n);
00211 unsigned int smlDevInfCTCapNumProperties(const SmlDevInfCTCap *ctcap);
00212 const SmlDevInfProperty *smlDevInfCTCapGetNthProperty(
00213 const SmlDevInfCTCap *ctcap,
00214 unsigned int n);
00215
00216
00217 void smlDevInfAddCTCap(SmlDevInf *devinf, SmlDevInfCTCapType type, const char *value) LIBSYNCML_DEPRECATED;
00218 SmlDevInfCTCapType smlDevInfGetNthCTCapType(SmlDevInf *devinf, unsigned int nth) LIBSYNCML_DEPRECATED;
00219 const char *smlDevInfGetNthCTCapValue(SmlDevInf *devinf, unsigned int nth) LIBSYNCML_DEPRECATED;
00220
00221
00222 void smlDevInfDataStoreSetRx(SmlDevInfDataStore *datastore, const char *contenttype, const char *version) LIBSYNCML_DEPRECATED;
00223 SmlBool smlDevInfDataStoreGetRx(const SmlDevInfDataStore *datastore, char **contenttype, char **version) LIBSYNCML_DEPRECATED;
00224 void smlDevInfDataStoreSetTx(SmlDevInfDataStore *datastore, const char *contenttype, const char *version) LIBSYNCML_DEPRECATED;
00225 SmlBool smlDevInfDataStoreGetTx(const SmlDevInfDataStore *datastore, char **contenttype, char **version) LIBSYNCML_DEPRECATED;
00226
00227 #endif //_SML_DEVINF_H_
00228