![]() |
Home · All Namespaces · All Classes |
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of systemui. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #include <QDBusArgument> 00021 #include "notificationgroup.h" 00022 #include "notificationwidgetparameterfactory.h" 00023 #include "genericnotificationparameterfactory.h" 00024 00025 NotificationGroup::NotificationGroup() : 00026 groupId_(0), 00027 userId_(0), 00028 parameters_() 00029 { 00030 } 00031 00032 NotificationGroup::NotificationGroup(uint groupId, uint userId, const NotificationParameters ¶meters) : 00033 groupId_(groupId), 00034 userId_(userId), 00035 parameters_(parameters) 00036 { 00037 } 00038 00039 NotificationGroup::~NotificationGroup() 00040 { 00041 } 00042 00043 uint NotificationGroup::groupId() const 00044 { 00045 return groupId_; 00046 } 00047 00048 uint NotificationGroup::userId() const 00049 { 00050 return userId_; 00051 } 00052 00053 const NotificationParameters &NotificationGroup::parameters() const 00054 { 00055 return parameters_; 00056 } 00057 00058 void NotificationGroup::setParameters(const NotificationParameters ¶meters) 00059 { 00060 parameters_ = parameters; 00061 } 00062 00063 void NotificationGroup::updateParameters(const NotificationParameters ¶meters) 00064 { 00065 parameters_.update(parameters); 00066 } 00067 00068 00069 QDataStream &operator<<(QDataStream &datastream, const NotificationGroup ¬ificationGroup) 00070 { 00071 datastream << notificationGroup.groupId_; 00072 datastream << notificationGroup.userId_; 00073 datastream << notificationGroup.parameters_; 00074 return datastream; 00075 } 00076 00077 QDataStream &operator>>(QDataStream &datastream, NotificationGroup ¬ificationGroup) 00078 { 00079 datastream >> notificationGroup.groupId_; 00080 datastream >> notificationGroup.userId_; 00081 datastream >> notificationGroup.parameters_; 00082 return datastream; 00083 } 00084 00085 QDBusArgument &operator<<(QDBusArgument &argument, const NotificationGroup &group) 00086 { 00087 argument.beginStructure(); 00088 argument << group.groupId_; 00089 argument << group.userId_; 00090 argument << group.parameters_; 00091 argument.endStructure(); 00092 00093 return argument; 00094 } 00095 00096 const QDBusArgument &operator>>(const QDBusArgument &argument, NotificationGroup &group) 00097 { 00098 argument.beginStructure(); 00099 argument >> group.groupId_; 00100 argument >> group.userId_; 00101 argument >> group.parameters_; 00102 argument.endStructure(); 00103 00104 return argument; 00105 }
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:19:34 Doxygen 1.7.1 |
MeeGo Touch |
