Version: (using KDE Devel) Installed from: Compiled sources Kopete seems to report to people that I have a webcam even though I don't, and have never set one up in the configuration area. I don't have any V4L devices at all, so when I go into the area all the dropdowns are empty and I have a blue screen. But a friend of mine said that MSN said that I had a webcam, so he clicked on the icon and I got the 'User wants to see your webcam' prompt. If I click OK at the prompt he gets no response for awhile, then he gets the no webcam image.
same... I meant to investigate this more before reporting, but I forgot. it was with an old svn version... I've got 0.12 now, so when I get home I'll try to remember to see whether I still have this problem.
When i coded it, it was because of a lack of support of a way to know we have not webcam in the avdevice
> ------- Additional Comments From ogoffart kde org 2006-01-25 23:34 ------- > When i coded it, it was because of a lack of support of a way to know we have not webcam in the avdevice > couldn't we just have a checkbox in the config for 'enable webcam'? even if I had one, I imagine I might not want it being available all the time... -- This insane ranting was brought to you by evyl bananas, and the number 3. www.chani3.com
SVN commit 503065 by mlarouche: BUG: 120790 Do not reports that the user has a webcam when it is not configured or available. M +21 -0 msnaccount.cpp M +11 -0 msnaccount.h M +1 -1 msnnotifysocket.cpp M +0 -8 msnprotocol.cpp M +0 -2 msnprotocol.h --- branches/work/kopete/dev-0.12/kopete/protocols/msn/msnaccount.cpp #503064:503065 @@ -19,6 +19,8 @@ #include "msnaccount.h" +#include <config.h> + #include <kaction.h> #include <kconfig.h> #include <kdebug.h> @@ -54,6 +56,9 @@ #include <kglobal.h> #endif +#if MSN_WEBCAM +#include "avdevice/videodevicepool.h" +#endif MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const char *name ) : Kopete::PasswordedAccount ( parent, AccountID.lower(), 0, name ) { @@ -103,6 +108,17 @@ if ( !groupGuid.isEmpty() ) m_groupList.insert( groupGuid , g ); } + + // Set the client Id for the myself contact. It sets what MSN feature we support. + m_clientId = MSNProtocol::MSNC4 | MSNProtocol::InkFormatGIF | MSNProtocol::SupportMultiPacketMessaging; + +#if MSN_WEBCAM + Kopete::AV::VideoDevicePool::self()->scanDevices(); + if( Kopete::AV::VideoDevicePool::self()->hasDevices() ) + { + m_clientId |= MSNProtocol::SupportWebcam; + } +#endif } @@ -121,6 +137,11 @@ return configGroup()->readBoolEntry( "useHttpMethod" , false ); } +QString MSNAccount::myselfClientId() const +{ + return QString::number(m_clientId, 10); +} + void MSNAccount::connectWithPassword( const QString &passwd ) { m_newContactList=false; --- branches/work/kopete/dev-0.12/kopete/protocols/msn/msnaccount.h #503064:503065 @@ -102,6 +102,12 @@ //END + /** + * Return the client ID for the myself contact of this account. + * It is dynamic to see if we really have a webcam or not. + */ + QString myselfClientId() const; + public slots: virtual void connectWithPassword( const QString &password ) ; virtual void disconnect() ; @@ -250,6 +256,11 @@ * I would like an API to request the password WITHOUT askling it. */ QString m_password; + + /** + * Cliend ID is a bitfield that contains supported features for a MSN contact. + */ + uint m_clientId; }; #endif --- branches/work/kopete/dev-0.12/kopete/protocols/msn/msnnotifysocket.cpp #503064:503065 @@ -1101,7 +1101,7 @@ if( onlineStatus() == Disconnected ) m_newstatus = status; else - sendCommand( "CHG", statusToString( status ) + " " + MSNProtocol::protocol()->clientId() + " " + escape(m_account->pictureObject()) ); + sendCommand( "CHG", statusToString( status ) + " " + m_account->myselfClientId() + " " + escape(m_account->pictureObject()) ); } void MSNNotifySocket::changePublicName( const QString &publicName, const QString &handle ) --- branches/work/kopete/dev-0.12/kopete/protocols/msn/msnprotocol.cpp #503064:503065 @@ -74,9 +74,6 @@ setCapabilities( Kopete::Protocol::BaseFgColor | Kopete::Protocol::BaseFont | Kopete::Protocol::BaseFormatting ); - // Build the MSN clientId. It sets what MSN feature we support. - m_clientId = MSNC4 | InkFormatGIF | SupportMultiPacketMessaging | SupportWebcam; - // m_status = m_unknownStatus = UNK; } @@ -160,11 +157,6 @@ return ( userid.contains('@') ==1 && userid.contains('.') >=1 && userid.contains(' ') == 0); } -QString MSNProtocol::clientId() -{ - return QString::number(m_clientId, 10); -} - QImage MSNProtocol::scalePicture(const QImage &picture) { QImage img(picture); --- branches/work/kopete/dev-0.12/kopete/protocols/msn/msnprotocol.h #503064:503065 @@ -158,7 +158,6 @@ static MSNProtocol* protocol(); static bool validContactId(const QString&); - QString clientId(); QImage scalePicture(const QImage &picture); private slots: @@ -167,7 +166,6 @@ private: static MSNProtocol *s_protocol; - uint m_clientId; signals: /**
Can you backport to the KDE 3.5 branch too?
SVN commit 505782 by mlarouche: Backport to KDE 3.5 branch: Do not reports that the user has a webcam when it is not configured or available. CCBUG: 120790 M +21 -0 msnaccount.cpp M +11 -0 msnaccount.h M +1 -1 msnnotifysocket.cpp M +0 -8 msnprotocol.cpp M +0 -2 msnprotocol.h --- branches/KDE/3.5/kdenetwork/kopete/protocols/msn/msnaccount.cpp #505781:505782 @@ -19,6 +19,8 @@ #include "msnaccount.h" +#include <config.h> + #include <kaction.h> #include <kconfig.h> #include <kdebug.h> @@ -54,6 +56,9 @@ #include <kglobal.h> #endif +#if MSN_WEBCAM +#include "avdevice/videodevicepool.h" +#endif MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const char *name ) : Kopete::PasswordedAccount ( parent, AccountID.lower(), 0, name ) { @@ -103,6 +108,17 @@ if ( !groupGuid.isEmpty() ) m_groupList.insert( groupGuid , g ); } + + // Set the client Id for the myself contact. It sets what MSN feature we support. + m_clientId = MSNProtocol::MSNC4 | MSNProtocol::InkFormatGIF | MSNProtocol::SupportMultiPacketMessaging; + +#if MSN_WEBCAM + Kopete::AV::VideoDevicePool::self()->scanDevices(); + if( Kopete::AV::VideoDevicePool::self()->hasDevices() ) + { + m_clientId |= MSNProtocol::SupportWebcam; + } +#endif } @@ -121,6 +137,11 @@ return configGroup()->readBoolEntry( "useHttpMethod" , false ); } +QString MSNAccount::myselfClientId() const +{ + return QString::number(m_clientId, 10); +} + void MSNAccount::connectWithPassword( const QString &passwd ) { m_newContactList=false; --- branches/KDE/3.5/kdenetwork/kopete/protocols/msn/msnaccount.h #505781:505782 @@ -102,6 +102,12 @@ //END + /** + * Return the client ID for the myself contact of this account. + * It is dynamic to see if we really have a webcam or not. + */ + QString myselfClientId() const; + public slots: virtual void connectWithPassword( const QString &password ) ; virtual void disconnect() ; @@ -250,6 +256,11 @@ * I would like an API to request the password WITHOUT askling it. */ QString m_password; + + /** + * Cliend ID is a bitfield that contains supported features for a MSN contact. + */ + uint m_clientId; }; #endif --- branches/KDE/3.5/kdenetwork/kopete/protocols/msn/msnnotifysocket.cpp #505781:505782 @@ -998,7 +998,7 @@ if( onlineStatus() == Disconnected ) m_newstatus = status; else - sendCommand( "CHG", statusToString( status ) + " " + MSNProtocol::protocol()->clientId() + " " + escape(m_account->pictureObject()) ); + sendCommand( "CHG", statusToString( status ) + " " + m_account->myselfClientId() + " " + escape(m_account->pictureObject()) ); } void MSNNotifySocket::changePublicName( const QString &publicName, const QString &handle ) --- branches/KDE/3.5/kdenetwork/kopete/protocols/msn/msnprotocol.cpp #505781:505782 @@ -74,9 +74,6 @@ setCapabilities( Kopete::Protocol::BaseFgColor | Kopete::Protocol::BaseFont | Kopete::Protocol::BaseFormatting ); - // Build the MSN clientId. It sets what MSN feature we support. - m_clientId = MSNC4 | InkFormatGIF | SupportMultiPacketMessaging | SupportWebcam; - // m_status = m_unknownStatus = UNK; } @@ -160,11 +157,6 @@ return ( userid.contains('@') ==1 && userid.contains('.') >=1 && userid.contains(' ') == 0); } -QString MSNProtocol::clientId() -{ - return QString::number(m_clientId, 10); -} - QImage MSNProtocol::scalePicture(const QImage &picture) { QImage img(picture); --- branches/KDE/3.5/kdenetwork/kopete/protocols/msn/msnprotocol.h #505781:505782 @@ -158,7 +158,6 @@ static MSNProtocol* protocol(); static bool validContactId(const QString&); - QString clientId(); QImage scalePicture(const QImage &picture); private slots: @@ -167,7 +166,6 @@ private: static MSNProtocol *s_protocol; - uint m_clientId; signals: /**
A simple call to VideoDevicePool::hasDevices() should do the job...
"A simple call to VideoDevicePool::hasDevices() should do the job..." err look closely at the commit log of this bug report ;)