summaryrefslogtreecommitdiffstats
path: root/kmobile/kmobiledevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmobile/kmobiledevice.cpp')
-rw-r--r--kmobile/kmobiledevice.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kmobile/kmobiledevice.cpp b/kmobile/kmobiledevice.cpp
index cfcbf6e88..9fdddf6fa 100644
--- a/kmobile/kmobiledevice.cpp
+++ b/kmobile/kmobiledevice.cpp
@@ -44,7 +44,7 @@
#define PRINT_DEBUG kdDebug(KMOBILEDEVICE_DEBUG_AREA) << "KMobileDevice: "
/**
- * The base plugin class of all mobile device drivers.
+ * The base plugin class of all mobile tqdevice drivers.
*/
KMobileDevice::KMobileDevice(TQObject *obj, const char *name, const TQStringList &args)
@@ -53,8 +53,8 @@ KMobileDevice::KMobileDevice(TQObject *obj, const char *name, const TQStringList
{
setClassType(Unclassified);
setCapabilities(hasNothing);
- m_deviceName = i18n("Unknown Device");
- m_deviceRevision = i18n("n/a"); /* not available */
+ m_tqdeviceName = i18n("Unknown Device");
+ m_tqdeviceRevision = i18n("n/a"); /* not available */
m_connectionName = i18n("Unknown Connection");
// set the config file name
@@ -78,20 +78,20 @@ bool KMobileDevice::connected()
}
// returns e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
-TQString KMobileDevice::deviceClassName() const
+TQString KMobileDevice::tqdeviceClassName() const
{
- return m_deviceClassName;
+ return m_tqdeviceClassName;
}
-// returns real device name, e.g. "Nokia 6310" or "Rio MP3 Player"
-TQString KMobileDevice::deviceName() const
+// returns real tqdevice name, e.g. "Nokia 6310" or "Rio MP3 Player"
+TQString KMobileDevice::tqdeviceName() const
{
- return m_deviceName;
+ return m_tqdeviceName;
}
TQString KMobileDevice::revision() const
{
- return m_deviceRevision;
+ return m_tqdeviceRevision;
}
bool KMobileDevice::isSlowDevice() const
@@ -104,18 +104,18 @@ bool KMobileDevice::isReadOnly() const
return false;
}
-bool KMobileDevice::configDialog( TQWidget *parent )
+bool KMobileDevice::configDialog( TQWidget *tqparent )
{
- KMessageBox::information( parent,
- i18n("This device does not need any configuration."),
- deviceName() );
+ KMessageBox::information( tqparent,
+ i18n("This tqdevice does not need any configuration."),
+ tqdeviceName() );
return true;
}
void KMobileDevice::setClassType( enum ClassType ct )
{
m_classType = ct;
- m_deviceClassName = defaultClassName(ct);
+ m_tqdeviceClassName = defaultClassName(ct);
}
enum KMobileDevice::ClassType KMobileDevice::classType() const
@@ -239,11 +239,11 @@ int KMobileDevice::storeNote( int, const TQString & )
/*
* File storage support
- * @param fileName path and name of a file in the mobile device, e.g. "/MYFILE.TXT", "/mp3/song1.mp3"
+ * @param fileName path and name of a file in the mobile tqdevice, e.g. "/MYFILE.TXT", "/mp3/song1.mp3"
*/
static
-void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString::null)
+void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString())
{
KIO::UDSAtom atom;
atom.m_uds = ID;
@@ -282,64 +282,64 @@ void KMobileDevice::createFileEntry(KIO::UDSEntry& entry, const TQString& name,
void KMobileDevice::listDir( const TQString & )
{
- emit error(KIO::ERR_CANNOT_ENTER_DIRECTORY,TQString::null);
+ emit error(KIO::ERR_CANNOT_ENTER_DIRECTORY,TQString());
}
void KMobileDevice::mkdir( const TQString &, int )
{
- emit error(KIO::ERR_COULD_NOT_MKDIR, TQString::null);
+ emit error(KIO::ERR_COULD_NOT_MKDIR, TQString());
}
void KMobileDevice::rename( const TQString &, const TQString &, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString());
}
void KMobileDevice::symlink( const TQString &, const TQString &, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString());
}
void KMobileDevice::del( const TQString &, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString());
}
void KMobileDevice::stat( const TQString & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString());
}
void KMobileDevice::chmod( const TQString &, int )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString());
}
void KMobileDevice::get( const TQString & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString());
}
void KMobileDevice::put( const TQString &, int, bool, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString());
}
void KMobileDevice::mimetype( const TQString & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString());
}
void KMobileDevice::special( const TQByteArray & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString());
}
/*
- * device locking/unlocking functions
+ * tqdevice locking/unlocking functions
*/
#ifdef HAVE_BAUDBOY_H
@@ -374,7 +374,7 @@ void KMobileDevice::special( const TQByteArray & )
#define DEVICE_LOCK_PATH_PREFIX "/var/lock/LCK.."
-bool KMobileDevice::lockDevice(const TQString &device, TQString &err_reason)
+bool KMobileDevice::lockDevice(const TQString &tqdevice, TQString &err_reason)
{
#ifdef HAVE_BAUDBOY_H
return ttylock(device.local8bit()) == EXIT_SUCCESS;
@@ -383,9 +383,9 @@ bool KMobileDevice::lockDevice(const TQString &device, TQString &err_reason)
return !dev_lock(device.local8bit());
# else
int pid = -1;
- TQStringList all = TQStringList::split('/', device);
+ TQStringList all = TQStringList::split('/', tqdevice);
if (!all.count()) {
- err_reason = i18n("Invalid device (%1)").arg(device);
+ err_reason = i18n("Invalid tqdevice (%1)").arg(tqdevice);
return false;
}
TQString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
@@ -410,12 +410,12 @@ bool KMobileDevice::lockDevice(const TQString &device, TQString &err_reason)
sleep(1);
if (!file.remove()) {
PRINT_DEBUG << TQString("Overriding failed, please check the permissions\n");
- PRINT_DEBUG << TQString("Cannot lock device %1\n").arg(device);
+ PRINT_DEBUG << TQString("Cannot lock tqdevice %1\n").arg(tqdevice);
err_reason = i18n("Lockfile %1 is stale. Please check permissions.").arg(lockName);
return false;
}
} else {
- err_reason = i18n("Device %1 already locked.").arg(device);
+ err_reason = i18n("Device %1 already locked.").arg(tqdevice);
return false;
}
}
@@ -424,7 +424,7 @@ bool KMobileDevice::lockDevice(const TQString &device, TQString &err_reason)
int fd = open(lockName.local8Bit(), O_CREAT | O_EXCL | O_WRONLY, 0644);
if (fd == -1) {
if (errno == EEXIST)
- err_reason = i18n("Device %1 seems to be locked by unknown process.").arg(device);
+ err_reason = i18n("Device %1 seems to be locked by unknown process.").arg(tqdevice);
else if (errno == EACCES)
err_reason = i18n("Please check permission on lock directory.");
else if (errno == ENOENT)
@@ -439,16 +439,16 @@ bool KMobileDevice::lockDevice(const TQString &device, TQString &err_reason)
close(fd);
PRINT_DEBUG << TQString("%1: Device %2 locked with lockfile %3.\n")
- .arg(deviceName()).arg(device).arg(lockName);
+ .arg(tqdeviceName()).arg(tqdevice).arg(lockName);
- err_reason = TQString::null;
+ err_reason = TQString();
return true;
# endif
#endif
}
-bool KMobileDevice::unlockDevice(const TQString &device)
+bool KMobileDevice::unlockDevice(const TQString &tqdevice)
{
#ifdef HAVE_BAUDBOY_H
return ttyunlock(device.local8bit()) == EXIT_SUCCESS;
@@ -456,7 +456,7 @@ bool KMobileDevice::unlockDevice(const TQString &device)
# ifdef HAVE_LOCKDEV_H
return 0 <= dev_unlock(device.local8bit(), getpid());
# else
- TQStringList all = TQStringList::split('/', device);
+ TQStringList all = TQStringList::split('/', tqdevice);
if (!all.count()) return false;
TQString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
TQFile file(lockName);