/usr/include/KF5/KBlog/kblog/blogcomment.h is in libkf5blog-dev 4:17.12.3-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | /*
This file is part of the kblog library.
Copyright (c) 2006-2007 Christian Weilbach <christian_weilbach@web.de>
Copyright (c) 2007 Mike McQuaid <mike@mikemcquaid.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KBLOG_BLOGCOMMENT_H
#define KBLOG_BLOGCOMMENT_H
#include <kblog_export.h>
#include <QString>
#include <QtAlgorithms>
class QDateTime;
class QUrl;
namespace KBlog
{
class BlogCommentPrivate;
/**
@brief
A class that represents a blog comment on the blog post.
@code
KBlog::BlogComment *comment = new BlogComment();
comment->setTitle( "This is the title." );
comment->setContent( "Here is some the content..." );
@endcode
@author Mike McQuaid \<mike\@mikemcquaid.com\>
*/
class KBLOG_EXPORT BlogComment
{
public:
/**
Copy Constructor for list handling.
@param comment The comment to copy.
*/
BlogComment(const BlogComment &comment);
/**
Constructor.
@param commentId The ID of the comment on the server.
*/
explicit BlogComment(const QString &commentId = QString());
/**
Virtual default destructor.
*/
virtual ~BlogComment();
/**
Returns the title.
@return The title.
@see setTitle( const QString& )
*/
QString title() const;
/**
Sets the title.
@param title This is the title.
@see title()
*/
void setTitle(const QString &title);
/**
Returns the content.
@return The content.
@see setContent( const QString& )
*/
QString content() const;
/**
Sets the content.
@param content This is the content.
@see content()
*/
void setContent(const QString &content);
/**
Returns the comment's id.
@return The comment's id
@see setCommentId( const QString& )
*/
QString commentId() const;
/**
Sets the comment's id.
@param id The comment's id.
@see commentId()
*/
void setCommentId(const QString &id);
/**
Returns the E-Mail address of the commentator.
@return The E-Mail.
@see setEmail( const QString& )
*/
QString email() const;
/**
Sets the E-Mail.
@param email This is the E-Mail address of the commentator.
@see email()
*/
void setEmail(const QString &email);
/**
Returns the commentator's name.
@return The name.
@see setName()
*/
QString name() const;
/**
Sets the name of the commentator.
@param name This is the commenator's name.
@see name()
*/
void setName(const QString &name);
/**
Returns the commentator's homepage URL.
@return The url of the commentator's homepage
@see setUrl( const QUrl& )
*/
QUrl url() const;
/**
Sets the commentator's homepage URL.
@param url The commentator's homepage url.
@see url()
*/
void setUrl(const QUrl &url);
/**
Returns the modification date-time.
@return The modification date-time.
@see setModificationDateTime( const QDateTime& )
*/
QDateTime modificationDateTime() const;
/**
Sets the modification date-time.
@param datetime The date-time the comment has been modified.
@see modificationDateTime( const QDateTime& )
*/
void setModificationDateTime(const QDateTime &datetime);
/**
Returns the creation date-time.
@return The creation date-time.
@see setCreationDateTime( const QDateTime& )
*/
QDateTime creationDateTime() const;
/**
Sets the creation date-time.
@param datetime The date-time the comment has been created.
@see creationDateTime()
*/
void setCreationDateTime(const QDateTime &datetime);
/**
The enumartion of the different post status, reflecting the status changes
on the server.
*/
enum Status {
/** Status of a freshly constructed comment on the client. */
New,
/** Status of a successfully fetched comment. */
Fetched,
/** Status of a successfully created comment.
@see GData::createComment( BlogPost*, BlogComment* ) */
Created,
/** Status of a successfully removed comment.
@see GData::removeComment( BlogPost*, BlogComment* ) */
Removed,
/** Status when an error has occurred on the server side.
@see error() */
Error
};
/**
Returns the status on the server.
@return The status.
@see setStatus( Status ), Status
*/
Status status() const;
/**
Sets the status.
@param status The status on the server.
@see status(), Status
*/
void setStatus(Status status);
/**
Returns the last error.
@returns The last error string.
@see setError( const QString& ), Error
*/
QString error() const;
/**
Sets the error.
@param error The error string.
@see error(), Error
*/
void setError(const QString &error);
/**
Overloaded for QList handling.
*/
BlogComment &operator=(const BlogComment &comment);
/**
The swap operator.
*/
void swap(BlogComment &other)
{
qSwap(this->d_ptr, other.d_ptr);
}
private:
BlogCommentPrivate *d_ptr; //krazy:exclude=dpointer can't constify due to bic and swap being declared inline
};
} //namespace KBlog
#endif
|