[kmobiletools] KDE/kdepim/kmobiletools/kmobiletools
Matthias Lechner
matthias at lmme.de
Sat Jun 9 20:19:22 CEST 2007
SVN commit 673282 by lechner:
Yet another API change
RockMan: please check if we really need to emit the signal smsDeleted() in at_engine.cpp (should be handled by smsList())
M +1 -1 engines/at_engine/at_engine.cpp
M +1 -3 libkmobiletools/engine.cpp
M +19 -45 libkmobiletools/engine.h
M +5 -0 libkmobiletools/enginedata.cpp
M +21 -0 libkmobiletools/enginedata.h
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/engines/at_engine/at_engine.cpp #673281:673282
@@ -201,7 +201,7 @@
break;
case KMobileTools::Job::delSMS:
if( ! ((DeleteSMS*)job)->succeeded() ) break;
- emit smsDeleted( ((DeleteSMS*)job)->sms()->uid() );
+ //emit smsDeleted( ((DeleteSMS*)job)->sms()->uid() );
break;
case KMobileTools::Job::storeSMS:
case KMobileTools::Job::sendStoredSMS:
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/engine.cpp #673281:673282
@@ -87,9 +87,7 @@
d->p_diffSMSList=new SMSList();
connect(d->weaver, SIGNAL(jobDone(KMobileTools::Job*) ), SLOT(processSlot(KMobileTools::Job*) ) );
connect(d->weaver, SIGNAL(suspended() ), this, SLOT(slotWeaverSuspended() ) );
- connect(engineData()->smsList(), SIGNAL(added( const QByteArray& )), SIGNAL(smsAdded( const QByteArray& ) )); // @TODO move
- connect(engineData()->smsList(), SIGNAL(removed( const QByteArray& )), SIGNAL(smsDeleted( const QByteArray& ))); // @TODO move
- connect(engineData()->smsList(), SIGNAL(modified( const QByteArray& )), SIGNAL(smsModified( const QByteArray& ))); // @TODO move
+
engineData()->setManufacturerID(Unknown);
d->s_newSMS = 0;
d->s_totalSMS = 0;
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/engine.h #673281:673282
@@ -297,36 +297,6 @@
Q_SIGNALS:
/**
- * This signal is emitted when KMobileTools finish a task.
- */
- void jobFinished( KMobileTools::Job::JobType );
-
- /**
- * This signal is emitted when an error is occurred.
- */
- void errorOccured();
-
- /**
- * This signal is emitted when a SMS folder is added
- *
- * @TODO move this signal to engineData (and add a method to explicitly
- * add and remove sms folders so the signal gets emitted automatically)
- */
- void smsFoldersAdded();
-
- /**
- * This signal is emitted when the mobile's phone book has been changed.
- *
- * @todo to be deleted
- */
- void phoneBookChanged( int, const ContactsList& );
-
- /**
- * This signal is emitted when the mobile's phone book has been changed.
- */
- void phoneBookChanged();
-
- /**
* This signal is emitted when the engine is suspended.
*/
void suspended();
@@ -344,34 +314,36 @@
void jobEnqueued( KMobileTools::Job * job );
/**
- * This signal is emitted when a new SMS is received.
- *
- * @param sms
+ * This signal is emitted when KMobileTools finish a task.
*/
- void smsArrived( const SMS* sms );
+ void jobFinished( KMobileTools::Job::JobType );
/**
- * This signal is emitted when a SMS is added.
- *
- * @param sms the sms that is added
+ * This signal is emitted when an error has occured
*/
- void smsAdded( const QByteArray& sms );
+ void errorOccured();
/**
- * This signal is emitted when a SMS is deleted.
- *
- * @param sms the sms that is deleted
+ * This signal is emitted when a SMS folder is added
+ *
+ * @TODO move this signal to engineData (and add a method to explicitly
+ * add and remove sms folders so the signal gets emitted automatically)
*/
- void smsDeleted( const QByteArray& sms );
+ void smsFoldersAdded();
/**
- * This signal is emitted when a SMS is modified.
+ * This signal is emitted when the mobile's phone book has been changed.
*
- * @param sms the sms that is modified
+ * @todo to be deleted
*/
- void smsModified( const QByteArray& sms );
+ void phoneBookChanged( int, const ContactsList& );
/**
+ * This signal is emitted when the mobile's phone book has been changed.
+ */
+ void phoneBookChanged();
+
+ /**
* This signal is emitted when phonebook is full.
*
* @TODO should be handled by errorOccured
@@ -380,6 +352,8 @@
/**
* This signal is emitted when calendar is parsed.
+ *
+ * @TODO what to do with this one here? move to EngineData?
*/
void calendarParsed();
};
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/enginedata.cpp #673281:673282
@@ -58,6 +58,11 @@
d->p_smsList=new SMSList(d->engine->objectName() );
d->p_addresseeList = new ContactsList();
d->p_calendar=new KCal::Event::List();
+
+ connect( d->p_smsList, SIGNAL( added( const QByteArray& ) ), SIGNAL( smsAdded( const QByteArray& ) ) );
+ connect( d->p_smsList, SIGNAL( removed( const QByteArray& ) ), SIGNAL( smsDeleted( const QByteArray& ) ) );
+ connect( d->p_smsList, SIGNAL( modified( const QByteArray& ) ), SIGNAL( smsModified( const QByteArray& ) ) );
+
}
EngineData::~EngineData()
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/enginedata.h #673281:673282
@@ -299,6 +299,27 @@
*/
void networkNameChanged( const QString& name );
+ /**
+ * This signal is emitted when a SMS is added.
+ *
+ * @param sms the sms that is added
+ */
+ void smsAdded( const QByteArray& sms );
+
+ /**
+ * This signal is emitted when a SMS is deleted.
+ *
+ * @param sms the sms that is deleted
+ */
+ void smsDeleted( const QByteArray& sms );
+
+ /**
+ * This signal is emitted when a SMS is modified.
+ *
+ * @param sms the sms that is modified
+ */
+ void smsModified( const QByteArray& sms );
+
private:
EngineDataPrivate *const d;
};
More information about the kmobiletools
mailing list