Mantis Bugtracker

Простой вид комментарии ] расширенный вид ] история ] печать ]
Номер Категория Серьезность Воспроизводимость Создан Изменен
0000071 [obex-data-server] General нововведение неприменима 2008-04-04 22:20 2008-10-17 19:59
Инициатор heston_james Видимость общая  
Ответственный skirsdeda
Приоритет обычный Решение решен  
Состояние закрыт   Версия продукта 0.3.1
Суть 0000071: Choose file name for when it is put to the server.
Подробности Having used ussp-push back in the past I always found it kind of neat that you could select the name of the file that is sent to the server, so you dont have to send the file with the same name as it has on the local file system.

As I'm new to this project I was also looking for a nice oppertunity to be able to look through the code and figure out whats going on and how everything works and thought this little mod might be a nice way to do so.
Дополнительные сведения I've attached a patch which some of you may find fun to play around with. I've changed the ods-dbus-test.c so that you will now need to use the following syntax when running the test application.

./ods-dbus-test 00:00:00:00:00:00 opp /path/to/file.txt newname.txt

This will then send the file /path/to/file.txt to the remote device but it will arive on the server as newname.txt :-)

If you're using the dbus interface from something like Python or JAVA then you will now need to pass a second argument to the SendFile() method which is the desired file name, like so.

SendFile("/path/to/file.txt", "newname.txt")

I look forward to working on this project with you guys, it seems really great. I've given my changes a test through here and it appears to work a charm but I look forward to getting your feedback on it.


Tэги Нет прикрепленных тэгов.
Вложенные файлы ? file icon choose_remote_name.patch [^] (3,392 bytes) 2008-04-04 22:20

- Связи

-  Комментарии
heston_james (инициатор)
2008-04-04 23:27

One thing I forgot to mention is that my patch will change the ods-dbus-test to use the SYSTEM_BUS instead of the SESSION_BUS as this is how I run it on my system.
pwachend (инициатор)
2008-07-25 18:55

I tried to apply your patch to the current svn version (rev 1680).
works perfectly with my sony erricson mobile.
but when using my nokia phone i get an org.openobex.Error.BadRequest Error...
heston_james (инициатор)
2008-07-25 18:59

pwachend, I built this patch quite some time ago :-) ODS has changed a great amount since then so I cant garauntee that it'll work.

I will take another look at this when I have some spare time, I suspect that the localization stuff skirs implemented for file names has changed the way in which this must work.

skirsdeda (администратор)
2008-07-29 22:22

I think we shouldn't change existing SendFile function. It would be better to add SendFileExt (string local_path, string remote, string type). This would let specify both different remote_name and specific type for file being sent.
heston_james (инициатор)
2008-07-31 13:27

I agree with this approach Skirs, it makes sense to keep the standard sendfile() clean and easy to use.

skirsdeda (администратор)
2008-08-04 23:23

Added SendFileExt (string local_path, string remote_filename, string type) to Session. This is available in svn rev 1725, will be included in 0.3.5 release.

- история
Дата изменения Пользователь Поле Изменение
2008-04-04 22:20 heston_james Новый вопрос
2008-04-04 22:20 heston_james Файл добавлен: choose_remote_name.patch
2008-04-04 23:27 heston_james Комментарий добавлен: 0000203
2008-07-25 18:55 pwachend Комментарий добавлен: 0000385
2008-07-25 18:59 heston_james Комментарий добавлен: 0000386
2008-07-29 22:22 skirsdeda Комментарий добавлен: 0000390
2008-07-29 22:22 skirsdeda Целевая версия => 0.4
2008-07-31 13:27 heston_james Комментарий добавлен: 0000391
2008-08-04 23:20 skirsdeda Состояние новый => назначен
2008-08-04 23:20 skirsdeda Ответственный => skirsdeda
2008-08-04 23:21 skirsdeda Целевая версия 0.4 => 0.3.5
2008-08-04 23:23 skirsdeda Состояние назначен => отработан
2008-08-04 23:23 skirsdeda Решен в версии => 0.3.5
2008-08-04 23:23 skirsdeda Решение открыт => решен
2008-08-04 23:23 skirsdeda Комментарий добавлен: 0000395
2008-10-17 19:58 skirsdeda Целевая версия 0.3.5 => 0.4
2008-10-17 19:59 skirsdeda Решен в версии 0.3.5 => 0.4
2008-10-17 19:59 skirsdeda Состояние отработан => закрыт

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker