smf/smfservermodule/smfserver/datastoremgr/dsm.h
changeset 26 83d6a149c755
parent 25 a180113055cb
equal deleted inserted replaced
25:a180113055cb 26:83d6a149c755
   103 		~DataStoreManager();			
   103 		~DataStoreManager();			
   104 		DataStoreManagerState getState() const;
   104 		DataStoreManagerState getState() const;
   105 		QString getErrorText() const;
   105 		QString getErrorText() const;
   106     
   106     
   107 	public slots:
   107 	public slots:
   108         SmfRelationId create(SmfProvider *aProvider=NULL, SmfContact *aContact=NULL);
   108          SmfError create(SmfRelationId &RelID,SmfProvider *aProvider=NULL, SmfContact *aContact=NULL);
   109 
   109 
   110 		/** assign contact to a relation */
   110 		/** assign contact to a relation */
   111 		SmfError associate( SmfRelationId aRelation,
   111 		SmfError associate( SmfRelationId aRelation,
   112 							const SmfContact* aContact,
   112 							const SmfContact* aContact,
   113 							SmfProvider* aProvider);				
   113 							SmfProvider* aProvider);				
   160 									const QString &managerUri,
   160 									const QString &managerUri,
   161 									const QString &snsName,
   161 									const QString &snsName,
   162 									const QString &snsDesc,
   162 									const QString &snsDesc,
   163 									const QString &snsUrl);
   163 									const QString &snsUrl);
   164         
   164         
   165         int addContactToTable( const QString &userId, 
   165         SmfError addContactToTable( int &aContactId,
       
   166 									const QString &userId, 
   166 									const QString &contactUrl,
   167 									const QString &contactUrl,
   167 									const QString &localId,
   168 									const QString &localId,
   168 									const QString &managerUri,
   169 									const QString &managerUri,
   169 									const QString &snsName,
   170 									const QString &snsName,
   170 									const QString &snsDesc, 
   171 									const QString &snsDesc, 
   182         
   183         
   183         /**search for relation item ( contact ) */
   184         /**search for relation item ( contact ) */
   184         SmfRelationItem* searchContact(const int aContactId);
   185         SmfRelationItem* searchContact(const int aContactId);
   185         
   186         
   186         /**search for contact if exist, return True/False*/
   187         /**search for contact if exist, return True/False*/
   187         TBool contactIfExist( const int aContactId);
   188         TBool contactIfExist( const QString &userId,const QString &snsName);
   188         
   189         
   189         
   190         
   190         /*------------------Operation on Relation Table-------------------*/ 
   191         /*------------------Operation on Relation Table-------------------*/ 
   191         /**insert a row in relation table and return relationId */
   192         /**insert a row in relation table and return relationId */
   192         int addRelationToTable(const int aContactId, int aRelationId = ENewRelation);
   193         int addRelationToTable(const int aContactId, int aRelationId = ENewRelation);
   231         static DataStoreManagerState state;			// Current state of DSM
   232         static DataStoreManagerState state;			// Current state of DSM
   232         QString lastMsg;							// Last message/error generated by the database.
   233         QString lastMsg;							// Last message/error generated by the database.
   233         QSqlDatabase db;
   234         QSqlDatabase db;
   234         SmfRelationItem * iSmsfRelationItem;
   235         SmfRelationItem * iSmsfRelationItem;
   235         DSMContactPckg	*iDSMContactPckgItem;
   236         DSMContactPckg	*iDSMContactPckgItem;
       
   237         SmfRelationId iRelationId;
   236        
   238        
   237 };
   239 };
   238 
   240 
   239 #endif
   241 #endif