I have made the following changes intended for : CE:MW:Shared / buteo-mtp
Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below. https://build.pub.meego.com//request/show/7744 Thank You, aard [This message was auto-generated] --- Request # 7744: Messages from BOSS: State: review at 2013-01-25T19:22:34 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: home:aard:branches:CE:MW:Shared / buteo-mtp -> CE:MW:Shared / buteo-mtp changes files: -------------- --- buteo-mtp.changes +++ buteo-mtp.changes @@ -0,0 +1,6 @@ +* Fri Jan 25 2013 Bernd Wachter <[email protected]> - 0.0.41 +- Trap SIGUSR1, preventing premature death of MTP +- Change default device identifications to Nemo +- Allow configuration through /etc/default/buteo-mtp and ~/.config/buteo-mtp +- Add debug option to service, generating ~/mtp.log + old: ---- buteo-mtp-0.0.40.tar.gz new: ---- buteo-mtp-0.0.41.tar.gz spec files: ----------- --- buteo-mtp.spec +++ buteo-mtp.spec @@ -1,5 +1,5 @@ Name: buteo-mtp -Version: 0.0.40 +Version: 0.0.41 Release: 1 Summary: MTP library Group: System/Libraries other changes: -------------- ++++++ buteo-mtp-0.0.40.tar.gz -> buteo-mtp-0.0.41.tar.gz --- mts/deviceinfo.xml +++ mts/deviceinfo.xml @@ -9,152 +9,152 @@ * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list -* of conditions and the following disclaimer. Redistributions in binary form must -* reproduce the above copyright notice, this list of conditions and the following +* of conditions and the following disclaimer. Redistributions in binary form must +* reproduce the above copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of Nokia Corporation nor the names of its contributors may be -* used to endorse or promote products derived from this software without specific +* Neither the name of Nokia Corporation nor the names of its contributors may be +* used to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. -* +* */ --> <DeviceInfo> - <DeviceInfoDataSet><!--MTP 1.0 DeviceInfo DataSet--> - <StdVersion>100</StdVersion><!--Standard Version--> - <MTPVendorExtn>0x00000006</MTPVendorExtn><!--MTP Vendor Extension ID--> - <MTPVersion>100</MTPVersion><!--MTP Version--> - <MTPExtn>microsoft.com:1.0; microsoft.com/WMPPD:11.0; </MTPExtn><!--MTP Extensions--> - <FnMode>0x8000</FnMode><!--Functional Mode--> - <Manufacturer>Nokia</Manufacturer><!--Manufacturer--> - <Model>Nokia N00</Model><!--Model--> - <DeviceVersion>MEEGO MTP 1.0</DeviceVersion><!--Device Version--> - <SerialNumber>00000000000000000000000000000001</SerialNumber> - - <OperationsSupported> - <OpCode>0x1001</OpCode><!--GetDeviceInfo--> - <OpCode>0x1002</OpCode><!--OpenSession--> - <OpCode>0x1003</OpCode><!--CloseSession--> - <OpCode>0x1004</OpCode><!--GetStorageIDs--> - <OpCode>0x1005</OpCode><!--GetStorageInfo--> - <OpCode>0x1006</OpCode><!--GetNumObjects--> - <OpCode>0x1007</OpCode><!--GetObjectHandles--> - <OpCode>0x1008</OpCode><!--GetObjectInfo--> - <OpCode>0x1009</OpCode><!--GetObject--> - <!--<OpCode>0x100A</OpCode>GetThumb--> - <OpCode>0x100B</OpCode><!--DeleteObject--> - <OpCode>0x100C</OpCode><!--SendObjectInfo--> - <OpCode>0x100D</OpCode><!--SendObject--> - <OpCode>0x1014</OpCode><!--GetDevicePropDesc--> - <OpCode>0x1015</OpCode><!--GetDevicePropValue--> - <OpCode>0x1016</OpCode><!--SetDevicePropValue--> - <OpCode>0x1019</OpCode><!--MoveObject--> - <OpCode>0x101A</OpCode><!--CopyObject--> - <OpCode>0x101B</OpCode><!--GetPartialObject--> - - <OpCode>0x9801</OpCode><!--GetObjectPropsSupported--> - <OpCode>0x9802</OpCode><!--GetObjectPropDesc--> - <OpCode>0x9803</OpCode><!--GetObjectPropValue--> - <OpCode>0x9804</OpCode><!--SetObjectPropValue--> - <OpCode>0x9805</OpCode><!--GetObjectPropList--> - <OpCode>0x9806</OpCode><!--SetObjectPropList--> - <!--<OpCode>0x9807</OpCode>GetInterdependentPropDesc--> - <OpCode>0x9808</OpCode><!--SendObjectPropList--> - <OpCode>0x9810</OpCode><!--GetObjectReferences--> - <OpCode>0x9811</OpCode><!--SetObjectReferences--> - - </OperationsSupported> - - <EventsSupported> - <EvCode>0x4002</EvCode><!--ObjectAdded--> - <EvCode>0x4003</EvCode><!--ObjectRemoved--> - <EvCode>0x4007</EvCode><!--ObjectInfoChanged--> - <EvCode>0xC801</EvCode><!--ObjectPropChanged--> - <EvCode>0x4004</EvCode><!--StorageAdded--> - <EvCode>0x4005</EvCode><!--StorageRemoved--> - <EvCode>0x400A</EvCode><!--StoreFull--> - <EvCode>0x4009</EvCode><!--RequestObjectTransfer--> - <EvCode>0x400C</EvCode><!--StorageInfoChanged--> - <EvCode>0x4008</EvCode><!--DeviceInfoChanged--> - <EvCode>0x4006</EvCode><!--DevicePropChanged--> - </EventsSupported> - - <DevPropsSupported> - <DevProp><!--Friendly name--> - <DevPropCode>0xD402</DevPropCode> - <DevPropValue id="friendlyname">Friendly</DevPropValue> - </DevProp> - <DevProp><!--Sync Partner--> - <DevPropCode>0xD401</DevPropCode> - <DevPropValue id="syncpartner">Friendly</DevPropValue> - </DevProp> - <DevProp><!--Copyright Info--> - <DevPropCode>0x501F</DevPropCode> - <DevPropValue>Do Not Copy</DevPropValue> - </DevProp> - <DevProp><!--Device Type--> - <DevPropCode>0XD407</DevPropCode> - <DevPropValue>0x00000003</DevPropValue> - </DevProp> + <DeviceInfoDataSet><!--MTP 1.0 DeviceInfo DataSet--> + <StdVersion>100</StdVersion><!--Standard Version--> + <MTPVendorExtn>0x00000006</MTPVendorExtn><!--MTP Vendor Extension ID--> + <MTPVersion>100</MTPVersion><!--MTP Version--> + <MTPExtn>microsoft.com:1.0; microsoft.com/WMPPD:11.0; </MTPExtn><!--MTP Extensions--> + <FnMode>0x8000</FnMode><!--Functional Mode--> + <Manufacturer>Nemo</Manufacturer><!--Manufacturer--> + <Model>Unconfigured Device</Model><!--Model--> + <DeviceVersion>Buteo MTP 1.0</DeviceVersion><!--Device Version--> + <SerialNumber>00000000000000000000000000000001</SerialNumber> + + <OperationsSupported> + <OpCode>0x1001</OpCode><!--GetDeviceInfo--> + <OpCode>0x1002</OpCode><!--OpenSession--> + <OpCode>0x1003</OpCode><!--CloseSession--> + <OpCode>0x1004</OpCode><!--GetStorageIDs--> + <OpCode>0x1005</OpCode><!--GetStorageInfo--> + <OpCode>0x1006</OpCode><!--GetNumObjects--> + <OpCode>0x1007</OpCode><!--GetObjectHandles--> + <OpCode>0x1008</OpCode><!--GetObjectInfo--> + <OpCode>0x1009</OpCode><!--GetObject--> + <!--<OpCode>0x100A</OpCode>GetThumb--> + <OpCode>0x100B</OpCode><!--DeleteObject--> + <OpCode>0x100C</OpCode><!--SendObjectInfo--> + <OpCode>0x100D</OpCode><!--SendObject--> + <OpCode>0x1014</OpCode><!--GetDevicePropDesc--> + <OpCode>0x1015</OpCode><!--GetDevicePropValue--> + <OpCode>0x1016</OpCode><!--SetDevicePropValue--> + <OpCode>0x1019</OpCode><!--MoveObject--> + <OpCode>0x101A</OpCode><!--CopyObject--> + <OpCode>0x101B</OpCode><!--GetPartialObject--> + + <OpCode>0x9801</OpCode><!--GetObjectPropsSupported--> + <OpCode>0x9802</OpCode><!--GetObjectPropDesc--> + <OpCode>0x9803</OpCode><!--GetObjectPropValue--> + <OpCode>0x9804</OpCode><!--SetObjectPropValue--> + <OpCode>0x9805</OpCode><!--GetObjectPropList--> + <OpCode>0x9806</OpCode><!--SetObjectPropList--> + <!--<OpCode>0x9807</OpCode>GetInterdependentPropDesc--> + <OpCode>0x9808</OpCode><!--SendObjectPropList--> + <OpCode>0x9810</OpCode><!--GetObjectReferences--> + <OpCode>0x9811</OpCode><!--SetObjectReferences--> + + </OperationsSupported> + + <EventsSupported> + <EvCode>0x4002</EvCode><!--ObjectAdded--> + <EvCode>0x4003</EvCode><!--ObjectRemoved--> + <EvCode>0x4007</EvCode><!--ObjectInfoChanged--> + <EvCode>0xC801</EvCode><!--ObjectPropChanged--> + <EvCode>0x4004</EvCode><!--StorageAdded--> + <EvCode>0x4005</EvCode><!--StorageRemoved--> + <EvCode>0x400A</EvCode><!--StoreFull--> + <EvCode>0x4009</EvCode><!--RequestObjectTransfer--> + <EvCode>0x400C</EvCode><!--StorageInfoChanged--> + <EvCode>0x4008</EvCode><!--DeviceInfoChanged--> + <EvCode>0x4006</EvCode><!--DevicePropChanged--> + </EventsSupported> + + <DevPropsSupported> + <DevProp><!--Friendly name--> + <DevPropCode>0xD402</DevPropCode> + <DevPropValue id="friendlyname">Friendly</DevPropValue> + </DevProp> + <DevProp><!--Sync Partner--> + <DevPropCode>0xD401</DevPropCode> + <DevPropValue id="syncpartner">Friendly</DevPropValue> + </DevProp> + <DevProp><!--Copyright Info--> + <DevPropCode>0x501F</DevPropCode> + <DevPropValue>Do Not Copy</DevPropValue> + </DevProp> + <DevProp><!--Device Type--> + <DevPropCode>0XD407</DevPropCode> + <DevPropValue>0x00000003</DevPropValue> + </DevProp> <DevProp><!-- Volume --> <DevPropCode>0xD403</DevPropCode> </DevProp> - </DevPropsSupported> + </DevPropsSupported> - <SupportedFormats> - <CommonFormat>0x3000</CommonFormat><!--Undefined--> - <CommonFormat>0x3001</CommonFormat><!--Association--> - <CommonFormat>0x3004</CommonFormat><!--Text--> - <CommonFormat>0x3005</CommonFormat><!--HTML--> - <CommonFormat>0xBA03</CommonFormat><!--Abstract Audio Album--> - <CommonFormat>0xBA05</CommonFormat><!--Abstract AV playlist--> - <CommonFormat>0xBB82</CommonFormat><!--vCard2--> - <CommonFormat>0xBB83</CommonFormat><!--vCard3--> - <CommonFormat>0xBE02</CommonFormat><!--vCal1--> - - <ImageFormat>0x3801</ImageFormat><!--JPEG--> - <ImageFormat>0x3807</ImageFormat><!--GIF--> - <ImageFormat>0x380B</ImageFormat><!--PNG--> - <ImageFormat>0x380D</ImageFormat><!--TIFF--> - <ImageFormat>0x3804</ImageFormat><!--BMP--> - - <AudioFormat>0x3008</AudioFormat><!--WAV--> - <AudioFormat>0x3009</AudioFormat><!--MP3--> - <AudioFormat>0xB901</AudioFormat><!--WMA--> - <AudioFormat>0xB903</AudioFormat><!--AAC--> - - <VideoFormat>0x300A</VideoFormat><!--AVI--> - <VideoFormat>0x300B</VideoFormat><!--MPEG--> - <VideoFormat>0xB984</VideoFormat><!--3GP--> - <VideoFormat>0xB982</VideoFormat><!--MP4--> - <VideoFormat>0xB981</VideoFormat><!--WMV--> - </SupportedFormats> - </DeviceInfoDataSet> - - <SupportedCodecs> - <Codec>0x00000000</Codec> - <Codec>0x00000001</Codec><!--WAVE_FORMAT_PCM--> - <Codec>0x00000006</Codec><!--WAVE_FORMAT_ALAW--> - <Codec>0x00000007</Codec><!--WAVE_FORMAT_MULAW--> - <Codec>0x00000055</Codec><!--WAVE_FORMAT_MPEGLAYER3--> - <Codec>0x00000160</Codec><!--WAVE_FORMAT_MSAUDIO1--> - <Codec>0x00000161</Codec><!--WAVE_FORMAT_MSAUDIO2--> - <Codec>0x00000162</Codec><!--WAVE_FORMAT_MSAUDIO3--> - <Codec>0x00004201</Codec><!--WAVE_FORMAT_NOKIA_AMR--> - <Codec>0x0000A106</Codec><!--WAVE_FORMAT_AAC--> - <Codec>0x00000022</Codec><!--WAVE_FORMAT_DSPGROUP_TRUESPEECH--> - </SupportedCodecs> + <SupportedFormats> + <CommonFormat>0x3000</CommonFormat><!--Undefined--> + <CommonFormat>0x3001</CommonFormat><!--Association--> + <CommonFormat>0x3004</CommonFormat><!--Text--> + <CommonFormat>0x3005</CommonFormat><!--HTML--> + <CommonFormat>0xBA03</CommonFormat><!--Abstract Audio Album--> + <CommonFormat>0xBA05</CommonFormat><!--Abstract AV playlist--> + <CommonFormat>0xBB82</CommonFormat><!--vCard2--> + <CommonFormat>0xBB83</CommonFormat><!--vCard3--> + <CommonFormat>0xBE02</CommonFormat><!--vCal1--> + + <ImageFormat>0x3801</ImageFormat><!--JPEG--> + <ImageFormat>0x3807</ImageFormat><!--GIF--> + <ImageFormat>0x380B</ImageFormat><!--PNG--> + <ImageFormat>0x380D</ImageFormat><!--TIFF--> + <ImageFormat>0x3804</ImageFormat><!--BMP--> + + <AudioFormat>0x3008</AudioFormat><!--WAV--> + <AudioFormat>0x3009</AudioFormat><!--MP3--> + <AudioFormat>0xB901</AudioFormat><!--WMA--> + <AudioFormat>0xB903</AudioFormat><!--AAC--> + + <VideoFormat>0x300A</VideoFormat><!--AVI--> + <VideoFormat>0x300B</VideoFormat><!--MPEG--> + <VideoFormat>0xB984</VideoFormat><!--3GP--> + <VideoFormat>0xB982</VideoFormat><!--MP4--> + <VideoFormat>0xB981</VideoFormat><!--WMV--> + </SupportedFormats> + </DeviceInfoDataSet> + + <SupportedCodecs> + <Codec>0x00000000</Codec> + <Codec>0x00000001</Codec><!--WAVE_FORMAT_PCM--> + <Codec>0x00000006</Codec><!--WAVE_FORMAT_ALAW--> + <Codec>0x00000007</Codec><!--WAVE_FORMAT_MULAW--> + <Codec>0x00000055</Codec><!--WAVE_FORMAT_MPEGLAYER3--> + <Codec>0x00000160</Codec><!--WAVE_FORMAT_MSAUDIO1--> + <Codec>0x00000161</Codec><!--WAVE_FORMAT_MSAUDIO2--> + <Codec>0x00000162</Codec><!--WAVE_FORMAT_MSAUDIO3--> + <Codec>0x00004201</Codec><!--WAVE_FORMAT_NOKIA_AMR--> + <Codec>0x0000A106</Codec><!--WAVE_FORMAT_AAC--> + <Codec>0x00000022</Codec><!--WAVE_FORMAT_DSPGROUP_TRUESPEECH--> + </SupportedCodecs> <ImageProperties> <ImageMinWidth>0</ImageMinWidth> @@ -162,30 +162,30 @@ <ImageMinHeight>0</ImageMinHeight> <ImageMaxHeight>5000</ImageMaxHeight> </ImageProperties> - <VideoProperties> - <VideoChannel>0x0001</VideoChannel> - <VideoChannel>0x0002</VideoChannel> - <VideoMinFPS>0</VideoMinFPS> - <VideoMaxFPS>100000</VideoMaxFPS> - <VideoScanType>0x0001</VideoScanType> - <VideoSampleRate>0x00000000</VideoSampleRate> - <VideoMinBitRate>0x00000000</VideoMinBitRate> - <VideoMaxBitRate>0xFFFFFFFF</VideoMaxBitRate> - <VideoAudioMinBitRate>0x00000000</VideoAudioMinBitRate> - <VideoAudioMaxBitRate>0xFFFFFFFF</VideoAudioMaxBitRate> - <VideoMinKeyFrameDist>0x00000000</VideoMinKeyFrameDist> - <VideoMaxKeyFrameDist>0xFFFFFFFF</VideoMaxKeyFrameDist> + <VideoProperties> + <VideoChannel>0x0001</VideoChannel> + <VideoChannel>0x0002</VideoChannel> + <VideoMinFPS>0</VideoMinFPS> + <VideoMaxFPS>100000</VideoMaxFPS> + <VideoScanType>0x0001</VideoScanType> + <VideoSampleRate>0x00000000</VideoSampleRate> + <VideoMinBitRate>0x00000000</VideoMinBitRate> + <VideoMaxBitRate>0xFFFFFFFF</VideoMaxBitRate> + <VideoAudioMinBitRate>0x00000000</VideoAudioMinBitRate> + <VideoAudioMaxBitRate>0xFFFFFFFF</VideoAudioMaxBitRate> + <VideoMinKeyFrameDist>0x00000000</VideoMinKeyFrameDist> + <VideoMaxKeyFrameDist>0xFFFFFFFF</VideoMaxKeyFrameDist> <VideoMinWidth>0</VideoMinWidth> <VideoMaxWidth>1920</VideoMaxWidth> <VideoMinHeight>0</VideoMinHeight> <VideoMaxHeight>1080</VideoMaxHeight> - </VideoProperties> + </VideoProperties> - <AudioProperties> - <AudioChannel>0x0001</AudioChannel><!--PRN_PTP_CH_CONF_MONO--> - <AudioChannel>0x0002</AudioChannel><!--PRN_PTP_CH_CONF_STEREO--> - <AudioSampleRate>0x00000000</AudioSampleRate> - <AudioMinBitRate>0x00000000</AudioMinBitRate> - <AudioMaxBitRate>0xFFFFFFFF</AudioMaxBitRate><!--500 kbps : lossless codecs--> - </AudioProperties> + <AudioProperties> + <AudioChannel>0x0001</AudioChannel><!--PRN_PTP_CH_CONF_MONO--> + <AudioChannel>0x0002</AudioChannel><!--PRN_PTP_CH_CONF_STEREO--> + <AudioSampleRate>0x00000000</AudioSampleRate> + <AudioMinBitRate>0x00000000</AudioMinBitRate> + <AudioMaxBitRate>0xFFFFFFFF</AudioMaxBitRate><!--500 kbps : lossless codecs--> + </AudioProperties> </DeviceInfo> --- mts/platform/deviceinfo/deviceinfo.cpp +++ mts/platform/deviceinfo/deviceinfo.cpp @@ -43,7 +43,7 @@ #define BATTERYLEVEL_DEFAULT 0 #define COPYRIGHTINFO_DEFAULT "Do Not Copy" -#define SYNCPARTNER_DEFAULT "Nokia" +#define SYNCPARTNER_DEFAULT "Nemo" #define DEVFRNDNAME_DEFAULT "Friendly" #define STDVER_DEFAULT 100 #define VENDOREXTN_DEFAULT 0x00000006 @@ -51,10 +51,10 @@ #define MTPVER_DEFAULT 100 #define MTPEXTN_DEFAULT "microsoft.com: 1.0; microsoft.com/WMPPD: 11.0; " #define FNMODE_DEFAULT 0 -#define MFR_DEFAULT "Nokia" -#define MODEL_DEFAULT "Nokia" +#define MFR_DEFAULT "Nemo" +#define MODEL_DEFAULT "Nemo" #define SERNO_DEFAULT "00000000000000000000000000000001" -#define DEVVER_DEFAULT "Nokia SW" +#define DEVVER_DEFAULT "Nemo" #define IMAGE_MIN_WIDTH 0 #define IMAGE_MAX_WIDTH 5000 #define IMAGE_MIN_HEIGHT 0 @@ -234,7 +234,7 @@ m_videoMinHeight(VIDEO_MIN_HEIGHT), m_videoMaxHeight(VIDEO_MAX_HEIGHT), m_videoMinFPS(0), m_videoMaxFPS(100000), m_videoScanType(0x0001), m_videoSampleRate(0), m_videoMinBitRate(0), m_videoMaxBitRate(0xFFFFFFFF), - m_audioMinBitRate(0), m_audioMaxBitRate(0xFFFFFFFF), + m_audioMinBitRate(0), m_audioMaxBitRate(0xFFFFFFFF), m_videoAudioMinBitRate(0), m_videoAudioMaxBitRate(0xFFFFFFFF), m_videoMinKFD(0), m_videoMaxKFD(0xFFFFFFFF), m_audioSampleRate(0) @@ -391,7 +391,7 @@ } /******************************************* - * const QString& DeviceInfo::model + * const QString& DeviceInfo::model ******************************************/ const QString& DeviceInfo::model() const { @@ -438,7 +438,7 @@ m_syncPartner = syncPartner; // Also modify the xml file - modifyDeviceInfoXml( "syncpartner", syncPartner ); + modifyDeviceInfoXml( "syncpartner", syncPartner ); } /******************************************* @@ -449,7 +449,7 @@ m_deviceFriendlyName = deviceFriendlyName; // Also modify the xml file - modifyDeviceInfoXml( "friendlyname", deviceFriendlyName ); + modifyDeviceInfoXml( "friendlyname", deviceFriendlyName ); } /******************************************* @@ -744,4 +744,3 @@ { return m_supportedCodecs; } - --- rpm/buteo-mtp.changes +++ rpm/buteo-mtp.changes @@ -1,3 +1,9 @@ +* Fri Jan 25 2013 Bernd Wachter <[email protected]> - 0.0.41 +- Trap SIGUSR1, preventing premature death of MTP +- Change default device identifications to Nemo +- Allow configuration through /etc/default/buteo-mtp and ~/.config/buteo-mtp +- Add debug option to service, generating ~/mtp.log + * Thu Jan 24 2013 Bernd Wachter <[email protected]> - 0.0.40 - Add tumbler dependency to provide thumbnails on request - Move MTP to user session --- rpm/buteo-mtp.spec +++ rpm/buteo-mtp.spec @@ -1,5 +1,5 @@ Name: buteo-mtp -Version: 0.0.40 +Version: 0.0.41 Release: 1 Summary: MTP library Group: System/Libraries --- service/service.cpp +++ service/service.cpp @@ -25,15 +25,21 @@ #include <signal.h> #include <iostream> #include <QCoreApplication> +#include <QDir> #include <QObject> #include <QEventLoop> +#include <QStringList> #include <QTimer> +#include <Logger.h> #include "mts.h" using namespace meegomtp1dot0; -void signalHandler(int /*signum*/) +void signalHandler(int signum) { + if(signum == SIGUSR1) + return; + // Is this async safe? Mts::destroyInstance(); _exit(0); @@ -45,12 +51,23 @@ signal(SIGINT, &signalHandler); signal(SIGALRM, &signalHandler); + signal(SIGUSR1, &signalHandler); QObject::connect(&app,SIGNAL(aboutToQuit()),Mts::getInstance(),SLOT(destroyInstance())); bool ok = Mts::getInstance()->activate(); if( ok ) { + if (app.arguments().count() > 1 && app.arguments().at(1) == "-d") + { + Buteo::Logger::createInstance(QDir::homePath() + "/mtp.log", false, 0); + if (!Mts::getInstance()->debugLogsEnabled()) + { + Mts::getInstance()->toggleDebugLogs(); + } + + Buteo::Logger::instance()->enable(); + } app.exec(); } else --- service/service.pro +++ service/service.pro @@ -8,6 +8,9 @@ INCLUDEPATH += . ../mts LIBS += -L../mts -lmeegomtp +CONFIG += link_pkgconfig +PKGCONFIG += synccommon + SOURCES += service.cpp #install --- service/start-mtp.sh +++ service/start-mtp.sh @@ -2,15 +2,19 @@ SERVICE=/usr/lib/mtp/mtp_service STORAGE_PATH=$HOME/.config/mtpstorage -LINK="Music Videos Pictures Downloads" LINK_BASE=$HOME +XDG_KEYS="DOWNLOAD DOCUMENTS MUSIC PICTURES VIDEOS" +XDG_LINKS="true" -if [ ! -d $STORAGE_PATH ]; then +[ -f /etc/default/buteo-mtp ] && . /etc/default/buteo-mtp +[ -f $HOME/.config/buteo-mtp ] && . $HOME/.config/buteo-mtp + +if [ $XDG_LINKS = "true" ]; then mkdir -p $STORAGE_PATH - for i in $LINK; + for i in $XDG_KEYS; do - ln -s $LINK_BASE/$i $STORAGE_PATH; + ln -sf `xdg-user-dir $i` $STORAGE_PATH; done fi -$SERVICE +exec $SERVICE $SERVICE_PARAMETERS
