qtecomplugins/xqplugins/src/xqplugininfo.cpp
changeset 1 2b40d63a9c3d
child 5 453da2cfceef
equal deleted inserted replaced
0:cfcbf08528c4 1:2b40d63a9c3d
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 *
       
     5 * This program is free software: you can redistribute it and/or modify
       
     6 * it under the terms of the GNU Lesser General Public License as published by
       
     7 * the Free Software Foundation, version 2.1 of the License.
       
     8 * 
       
     9 * This program is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12 * GNU Lesser General Public License for more details.
       
    13 *
       
    14 * You should have received a copy of the GNU Lesser General Public License
       
    15 * along with this program.  If not, 
       
    16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
       
    17 *
       
    18 * Description:  Class implement plugin description
       
    19 *
       
    20 */
       
    21 
       
    22 #include "xqplugininfo.h"
       
    23 #include "xqplugininfoprivate.h"
       
    24 
       
    25 XQPluginInfo::XQPluginInfo()
       
    26 :
       
    27 d_ptr(new XQPluginInfoPrivate())
       
    28 {
       
    29 }
       
    30 
       
    31 XQPluginInfo::XQPluginInfo(const XQPluginInfo &pluginInfo)
       
    32 :
       
    33 d_ptr(new XQPluginInfoPrivate(*pluginInfo.d_ptr))
       
    34 {
       
    35 }
       
    36 
       
    37 XQPluginInfo::XQPluginInfo(quint32 id, 
       
    38                            quint32 version, 
       
    39                            const QString &dllName, 
       
    40                            const QString &opaqueData)
       
    41 :
       
    42 d_ptr(new XQPluginInfoPrivate(id, version, dllName, opaqueData))
       
    43 {
       
    44 }
       
    45 
       
    46 XQPluginInfo &XQPluginInfo::operator=(const XQPluginInfo &other)
       
    47 {
       
    48     if (this != &other) {
       
    49         if (d_ptr != 0){
       
    50             delete d_ptr;
       
    51         }
       
    52         d_ptr = new XQPluginInfoPrivate(*other.d_ptr);
       
    53     }
       
    54     return *this;
       
    55 }
       
    56 
       
    57 XQPluginInfo::~XQPluginInfo()
       
    58 {
       
    59     if (d_ptr != 0){
       
    60         delete d_ptr;
       
    61     }
       
    62 }
       
    63 
       
    64 quint32 XQPluginInfo::uid() const
       
    65 {
       
    66     return d_ptr->uid();
       
    67 }
       
    68 
       
    69 quint32 XQPluginInfo::version() const
       
    70 {
       
    71     return d_ptr->version();
       
    72 }
       
    73 
       
    74 const QString& XQPluginInfo::dllName() const
       
    75 {
       
    76     return d_ptr->dllName();
       
    77 }
       
    78 
       
    79 const QString& XQPluginInfo::opaqueData() const
       
    80 {
       
    81     return d_ptr->opaqueData();
       
    82 }