smf/smfservermodule/smfserver/datastoremgr/smfSns.cpp
changeset 7 be09cf1f39dd
equal deleted inserted replaced
6:c39a6cfd1fb9 7:be09cf1f39dd
       
     1 /*!	\file
       
     2         \brief File containing implementation for SMFSocialNetworkingSite class.
       
     3 
       
     4         Copyright (c) 2010 Sasken Communication Technologies Ltd.
       
     5         All rights reserved.
       
     6         This component and the accompanying materials are made available
       
     7         under the terms of the "{License}"
       
     8         which accompanies  this distribution, and is available
       
     9         at the URL "{LicenseUrl}".
       
    10 
       
    11         \author Jaspinder Singh, Sasken Communication Technologies Ltd - Initial contribution
       
    12 
       
    13         \version 0.1
       
    14 
       
    15 */
       
    16 
       
    17 #include "smfSns.h"
       
    18 
       
    19 //! \fn SMFSocialNetworkingSite(const QString& name, const QString& url, QObject* parent = 0)
       
    20 /*!
       
    21     \brief Constructor for SMFSocialNetworkingSite class
       
    22     \param name Name of the Social Networking site
       
    23     \param url URL of the Social Networking Site
       
    24     \param parent Parent of the class. Default 0.
       
    25 */
       
    26 SMFSocialNetworkingSite::SMFSocialNetworkingSite(const QString& name, const QString& url, QObject* parent): QObject( parent ){
       
    27     setSnsName(name);
       
    28     setSnsURL(url);
       
    29     setSnsID(-1); // Set a negative ID till we store the object in the database or retrieve it from the database.
       
    30 }
       
    31 
       
    32 
       
    33 //! \fn ~SMFSocialNetworkingSite()
       
    34 /*!
       
    35     \brief Destructor for SMFSocialNetworkingSite class
       
    36 */
       
    37 SMFSocialNetworkingSite::~SMFSocialNetworkingSite(){
       
    38     //Empty
       
    39 }
       
    40 
       
    41 
       
    42 //! \fn int snsID() const
       
    43 /*!
       
    44     \brief Returns the ID for the social networking site the object corresponds to.
       
    45     \return Integer ID for the social networking site the object represents.
       
    46 */
       
    47 int SMFSocialNetworkingSite::snsID() const{
       
    48     return m_sns_id;
       
    49 }
       
    50 
       
    51 
       
    52 //! \fn const QString& snsName() const
       
    53 /*!
       
    54     \brief Gets the name of the social networking site.
       
    55     \return A const reference to the name of the social networking site
       
    56     \sa setSnsName()
       
    57 */
       
    58 const QString& SMFSocialNetworkingSite::snsName() const{
       
    59     return m_sns_name;
       
    60 }
       
    61 
       
    62 
       
    63 //! \fn const QString& snsURL() const
       
    64 /*!
       
    65     \brief Gets the URL of the social networking site
       
    66     \return A const reference to the URL of the social networking site
       
    67     \sa setSnsURL()
       
    68 */
       
    69 const QString& SMFSocialNetworkingSite::snsURL() const{
       
    70     return m_sns_url;
       
    71 }
       
    72 
       
    73 
       
    74 //! \fn void setSnsName(const QString& name)
       
    75 /*!
       
    76     \brief 	Setter method for name of the social networking site
       
    77     \param 	name 	reference to the name object
       
    78     \sa 	snsName()
       
    79 */
       
    80 void SMFSocialNetworkingSite::setSnsName(const QString &name){
       
    81     m_sns_name = name;
       
    82 }
       
    83 
       
    84 
       
    85 //! \fn void setSnsURL(const QString& url)
       
    86 /*!
       
    87     \brief Setter method for the URL of the social networking site
       
    88     \param 	url 	const reference to the URL object
       
    89     \sa 	snsURL()
       
    90 */
       
    91 void SMFSocialNetworkingSite::setSnsURL(const QString &url){
       
    92     m_sns_url = url;
       
    93 }
       
    94 
       
    95 
       
    96 //! \fn void setSnsID(int id)
       
    97 /*!
       
    98     \brief Setter method for the id of the social networking site
       
    99     \param 	id 	Integer ID
       
   100 */
       
   101 void SMFSocialNetworkingSite::setSnsID(int id){
       
   102     m_sns_id = id;
       
   103 }