<sequence> \
<sequence> \
<uuid value=\"0x1106\"/> \
- <uint16 value=\"0x0100\" name=\"version\"/> \
+ <uint16 value=\"0x0102\" name=\"version\"/> \
</sequence> \
</sequence> \
</attribute> \
<attribute id=\"0x0100\"> \
<text value=\"%s\" name=\"name\"/> \
</attribute> \
+ <attribute id=\"0x0200\"> \
+ <uint16 value=\"%u\" name=\"psm\"/> \
+ </attribute> \
</record>"
static const uint8_t FTP_TARGET[TARGET_SIZE] = {
root_folder = obex_option_root_folder();
manager_register_session(os);
-#ifdef TIZEN_PATCH
- manager_register_transfer(os);
-#endif
ftp = g_new0(struct ftp_session, 1);
set_folder(ftp, root_folder);
if (ftp->folder == NULL)
return -ENOENT;
-#ifdef TIZEN_PATCH
- if (type == NULL) /*We need to avoid the authorization during folder listing which is a get*/
- manager_emit_transfer_started(ftp->os);
-#endif
ret = get_by_type(ftp, type);
if (ret < 0)
path = g_build_filename(ftp->folder, name, NULL);
-#ifdef TIZEN_PATCH
- manager_emit_transfer_started(os);
-#endif
-
ret = obex_put_stream_start(os, path);
g_free(path);
case 0x01: /* Move/Rename Object */
return ftp_move(ftp, name, destname);
default:
- return -EINVAL;
+ return -ENOSYS;
}
}
-#ifdef TIZEN_PATCH
-static void ftp_progress(struct obex_session *os, void *user_data)
-{
- manager_emit_transfer_progress(os);
-}
-#endif
-
void ftp_disconnect(struct obex_session *os, void *user_data)
{
struct ftp_session *ftp = user_data;
manager_unregister_session(os);
-#ifdef TIZEN_PATCH
- manager_unregister_transfer(os);
-#endif
-
g_free(ftp->folder);
g_free(ftp);
}
-#ifdef TIZEN_PATCH
-static void ftp_reset(struct obex_session *os, void *user_data)
-{
- const char *type = obex_get_type(os);
-
- if (type == NULL)
- manager_emit_transfer_completed(os);
-}
-#endif
-
static struct obex_service_driver ftp = {
.name = "File Transfer server",
.service = OBEX_FTP,
.channel = FTP_CHANNEL,
+ .port = OBEX_PORT_RANDOM,
.secure = TRUE,
.record = FTP_RECORD,
.target = FTP_TARGET,
.chkput = ftp_chkput,
.setpath = ftp_setpath,
.action = ftp_action,
- .disconnect = ftp_disconnect,
-#ifdef TIZEN_PATCH
- .progress = ftp_progress,
- .reset = ftp_reset
-#endif
+ .disconnect = ftp_disconnect
};
static int ftp_init(void)