#define VCARD_FILE CONFIGDIR "/vcard.vcf"
#define OPP_CHANNEL 9
-
-#ifdef TIZEN_PATCH
-/* We do not support iCal, vNote, vMessage */
#define OPP_RECORD "<?xml version=\"1.0\" encoding=\"UTF-8\" ?> \
<record> \
<attribute id=\"0x0001\"> \
<sequence> \
<sequence> \
<uuid value=\"0x1105\"/> \
- <uint16 value=\"0x0100\" name=\"version\"/> \
- </sequence> \
- </sequence> \
- </attribute> \
- \
- <attribute id=\"0x0100\"> \
- <text value=\"%s\" name=\"name\"/> \
- </attribute> \
- \
- <attribute id=\"0x0303\"> \
- <sequence> \
- <uint8 value=\"0x01\"/> \
- <uint8 value=\"0x02\"/> \
- <uint8 value=\"0x03\"/> \
- <uint8 value=\"0xff\"/> \
- </sequence> \
- </attribute> \
-</record>"
-
-#else
-
-#define OPP_RECORD "<?xml version=\"1.0\" encoding=\"UTF-8\" ?> \
-<record> \
- <attribute id=\"0x0001\"> \
- <sequence> \
- <uuid value=\"0x1105\"/> \
- </sequence> \
- </attribute> \
- \
- <attribute id=\"0x0004\"> \
- <sequence> \
- <sequence> \
- <uuid value=\"0x0100\"/> \
- </sequence> \
- <sequence> \
- <uuid value=\"0x0003\"/> \
- <uint8 value=\"%u\" name=\"channel\"/> \
- </sequence> \
- <sequence> \
- <uuid value=\"0x0008\"/> \
- </sequence> \
- </sequence> \
- </attribute> \
- \
- <attribute id=\"0x0009\"> \
- <sequence> \
- <sequence> \
- <uuid value=\"0x1105\"/> \
- <uint16 value=\"0x0100\" name=\"version\"/> \
+ <uint16 value=\"0x0102\" name=\"version\"/> \
</sequence> \
</sequence> \
</attribute> \
<uint8 value=\"0xff\"/> \
</sequence> \
</attribute> \
+ <attribute id=\"0x0200\"> \
+ <uint16 value=\"%u\" name=\"psm\"/> \
+ </attribute> \
</record>"
-#endif
static void *opp_connect(struct obex_session *os, int *err)
{
int err;
if (obex_get_size(os) == OBJECT_SIZE_DELETE)
- return -EINVAL;
+ return -ENOSYS;
t = obex_get_name(os);
if (t != NULL && !is_filename(t))
path = g_build_filename(folder, name, NULL);
- manager_emit_transfer_started(os);
-
err = obex_put_stream_start(os, path);
g_free(path);
+ if (err < 0)
+ goto failed;
+
+ manager_emit_transfer_started(os);
+
failed:
g_free(folder);
g_free(name);
.name = "Object Push server",
.service = OBEX_OPP,
.channel = OPP_CHANNEL,
-#ifdef TIZEN_PATCH
- .secure = TRUE,
-#endif
+ .port = OBEX_PORT_RANDOM,
.record = OPP_RECORD,
.connect = opp_connect,
.progress = opp_progress,