summaryrefslogtreecommitdiffstats
path: root/kmobile/kmobiledevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmobile/kmobiledevice.cpp')
-rw-r--r--kmobile/kmobiledevice.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kmobile/kmobiledevice.cpp b/kmobile/kmobiledevice.cpp
index a4d807da0..36c6bacb7 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 tqdevice drivers.
+ * The base plugin class of all mobile device 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_tqdeviceName = i18n("Unknown Device");
- m_tqdeviceRevision = i18n("n/a"); /* not available */
+ m_deviceName = i18n("Unknown Device");
+ m_deviceRevision = i18n("n/a"); /* not available */
m_connectionName = i18n("Unknown Connection");
// set the config file name
@@ -63,7 +63,7 @@ KMobileDevice::KMobileDevice(TQObject *obj, const char *name, const TQStringList
m_config = new KConfig();
else
m_config = new KConfig(m_configFileName);
- PRINT_DEBUG << TQString("name of config file is %1\n").tqarg(m_configFileName);
+ PRINT_DEBUG << TQString("name of config file is %1\n").arg(m_configFileName);
}
KMobileDevice::~KMobileDevice()
@@ -78,20 +78,20 @@ bool KMobileDevice::connected()
}
// returns e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
-TQString KMobileDevice::tqdeviceClassName() const
+TQString KMobileDevice::deviceClassName() const
{
- return m_tqdeviceClassName;
+ return m_deviceClassName;
}
-// returns real tqdevice name, e.g. "Nokia 6310" or "Rio MP3 Player"
-TQString KMobileDevice::tqdeviceName() const
+// returns real device name, e.g. "Nokia 6310" or "Rio MP3 Player"
+TQString KMobileDevice::deviceName() const
{
- return m_tqdeviceName;
+ return m_deviceName;
}
TQString KMobileDevice::revision() const
{
- return m_tqdeviceRevision;
+ return m_deviceRevision;
}
bool KMobileDevice::isSlowDevice() const
@@ -107,15 +107,15 @@ bool KMobileDevice::isReadOnly() const
bool KMobileDevice::configDialog( TQWidget *parent )
{
KMessageBox::information( parent,
- i18n("This tqdevice does not need any configuration."),
- tqdeviceName() );
+ i18n("This device does not need any configuration."),
+ deviceName() );
return true;
}
void KMobileDevice::setClassType( enum ClassType ct )
{
m_classType = ct;
- m_tqdeviceClassName = defaultClassName(ct);
+ m_deviceClassName = defaultClassName(ct);
}
enum KMobileDevice::ClassType KMobileDevice::classType() const
@@ -239,7 +239,7 @@ int KMobileDevice::storeNote( int, const TQString & )
/*
* File storage support
- * @param fileName path and name of a file in the mobile tqdevice, e.g. "/MYFILE.TXT", "/mp3/song1.mp3"
+ * @param fileName path and name of a file in the mobile device, e.g. "/MYFILE.TXT", "/mp3/song1.mp3"
*/
static
@@ -260,7 +260,7 @@ void KMobileDevice::createDirEntry(KIO::UDSEntry& entry, const TQString& name, c
addAtom(entry, KIO::UDS_ACCESS, 0500);
addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
addAtom(entry, KIO::UDS_URL, 0, url);
- PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").tqarg(name).tqarg(mime).tqarg(url);
+ PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url);
// addAtom(entry, KIO::UDS_SIZE, 0);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
}
@@ -276,7 +276,7 @@ void KMobileDevice::createFileEntry(KIO::UDSEntry& entry, const TQString& name,
addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
if (size) addAtom(entry, KIO::UDS_SIZE, size);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
- PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").tqarg(name).tqarg(size).tqarg(mime);
+ PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime);
}
@@ -339,7 +339,7 @@ void KMobileDevice::special( const TQByteArray & )
/*
- * tqdevice locking/unlocking functions
+ * device 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 &tqdevice, TQString &err_reason)
+bool KMobileDevice::lockDevice(const TQString &device, TQString &err_reason)
{
#ifdef HAVE_BAUDBOY_H
return ttylock(device.local8bit()) == EXIT_SUCCESS;
@@ -383,9 +383,9 @@ bool KMobileDevice::lockDevice(const TQString &tqdevice, TQString &err_reason)
return !dev_lock(device.local8bit());
# else
int pid = -1;
- TQStringList all = TQStringList::split('/', tqdevice);
+ TQStringList all = TQStringList::split('/', device);
if (!all.count()) {
- err_reason = i18n("Invalid tqdevice (%1)").tqarg(tqdevice);
+ err_reason = i18n("Invalid device (%1)").arg(device);
return false;
}
TQString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
@@ -393,7 +393,7 @@ bool KMobileDevice::lockDevice(const TQString &tqdevice, TQString &err_reason)
if (file.exists() && file.open(IO_ReadOnly)) {
if (file.size() == 0) {
err_reason = i18n("Unable to read lockfile %s. Please check for reason and "
- "remove the lockfile by hand.").tqarg(lockName);
+ "remove the lockfile by hand.").arg(lockName);
PRINT_DEBUG << err_reason;
return false;
}
@@ -406,16 +406,16 @@ bool KMobileDevice::lockDevice(const TQString &tqdevice, TQString &err_reason)
file.close();
if (pid > 0 && kill((pid_t)pid, 0) < 0 && errno == ESRCH) {
- PRINT_DEBUG << TQString("Lockfile %1 is stale. Overriding it..\n").tqarg(lockName);
+ PRINT_DEBUG << TQString("Lockfile %1 is stale. Overriding it..\n").arg(lockName);
sleep(1);
if (!file.remove()) {
PRINT_DEBUG << TQString("Overriding failed, please check the permissions\n");
- PRINT_DEBUG << TQString("Cannot lock tqdevice %1\n").tqarg(tqdevice);
- err_reason = i18n("Lockfile %1 is stale. Please check permissions.").tqarg(lockName);
+ PRINT_DEBUG << TQString("Cannot lock device %1\n").arg(device);
+ err_reason = i18n("Lockfile %1 is stale. Please check permissions.").arg(lockName);
return false;
}
} else {
- err_reason = i18n("Device %1 already locked.").tqarg(tqdevice);
+ err_reason = i18n("Device %1 already locked.").arg(device);
return false;
}
}
@@ -424,22 +424,22 @@ bool KMobileDevice::lockDevice(const TQString &tqdevice, 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.").tqarg(tqdevice);
+ err_reason = i18n("Device %1 seems to be locked by unknown process.").arg(device);
else if (errno == EACCES)
err_reason = i18n("Please check permission on lock directory.");
else if (errno == ENOENT)
- err_reason = i18n("Cannot create lockfile %1. Please check for existence of path.").tqarg(lockName);
+ err_reason = i18n("Cannot create lockfile %1. Please check for existence of path.").arg(lockName);
else
- err_reason = i18n("Could not create lockfile %1. Error-Code is %2.").tqarg(lockName).tqarg(errno);
+ err_reason = i18n("Could not create lockfile %1. Error-Code is %2.").arg(lockName).arg(errno);
return false;
}
TQString lockText;
- lockText = TQString("%1 kmobile\n").tqarg(getpid(),10);
+ lockText = TQString("%1 kmobile\n").arg(getpid(),10);
write(fd, lockText.utf8(), lockText.utf8().length());
close(fd);
PRINT_DEBUG << TQString("%1: Device %2 locked with lockfile %3.\n")
- .tqarg(tqdeviceName()).tqarg(tqdevice).tqarg(lockName);
+ .arg(deviceName()).arg(device).arg(lockName);
err_reason = TQString();
@@ -448,7 +448,7 @@ bool KMobileDevice::lockDevice(const TQString &tqdevice, TQString &err_reason)
#endif
}
-bool KMobileDevice::unlockDevice(const TQString &tqdevice)
+bool KMobileDevice::unlockDevice(const TQString &device)
{
#ifdef HAVE_BAUDBOY_H
return ttyunlock(device.local8bit()) == EXIT_SUCCESS;
@@ -456,7 +456,7 @@ bool KMobileDevice::unlockDevice(const TQString &tqdevice)
# ifdef HAVE_LOCKDEV_H
return 0 <= dev_unlock(device.local8bit(), getpid());
# else
- TQStringList all = TQStringList::split('/', tqdevice);
+ TQStringList all = TQStringList::split('/', device);
if (!all.count()) return false;
TQString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
TQFile file(lockName);