~ubuntu-branches/ubuntu/saucy/kopete/saucy-proposed

« back to all changes in this revision

Viewing changes to protocols/oscar/liboscar/oscarmessageplugin.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-06-21 02:22:39 UTC
  • Revision ID: package-import@ubuntu.com-20130621022239-63l3zc8p0nf26pt6
Tags: upstream-4.10.80
ImportĀ upstreamĀ versionĀ 4.10.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Kopete Oscar Protocol
 
3
    oscarmessageplugin.h - Oscar Message Plugin
 
4
 
 
5
    Copyright (c) 2006-2007 Roman Jarosz <kedgedev@centrum.cz>
 
6
 
 
7
    Kopete (c) 2006-2007 by the Kopete developers <kopete-devel@kde.org>
 
8
 
 
9
    *************************************************************************
 
10
    *                                                                       *
 
11
    * This library is free software; you can redistribute it and/or         *
 
12
    * modify it under the terms of the GNU Lesser General Public            *
 
13
    * License as published by the Free Software Foundation; either          *
 
14
    * version 2 of the License, or (at your option) any later version.      *
 
15
    *                                                                       *
 
16
    *************************************************************************
 
17
*/
 
18
 
 
19
#ifndef OSCARMESSAGEPLUGIN_H
 
20
#define OSCARMESSAGEPLUGIN_H
 
21
 
 
22
#include <QSharedDataPointer>
 
23
 
 
24
#include "kopete_export.h"
 
25
#include "oscartypes.h"
 
26
 
 
27
namespace Oscar
 
28
{
 
29
 
 
30
class LIBOSCAR_EXPORT MessagePlugin
 
31
{
 
32
public:
 
33
 
 
34
        enum Types { Unknown = 0, Message, StatusMsgExt, File, WebUrl,
 
35
                     Contacts, GreetingCard, Chat, XtrazScript };
 
36
 
 
37
        enum SubTypes {
 
38
                SubStandardSend     = 0x00,
 
39
                SubContactsRequest  = 0x02,
 
40
                SubScriptInvitation = 0x01,
 
41
                SubScriptData       = 0x02,
 
42
                SubScriptUserRemove = 0x04,
 
43
                SubScriptNotify     = 0x08
 
44
        };
 
45
 
 
46
        MessagePlugin();
 
47
        MessagePlugin( const MessagePlugin& mp );
 
48
        MessagePlugin& operator=( const MessagePlugin& mp );
 
49
        ~MessagePlugin();
 
50
 
 
51
        /** get the message plugin type */
 
52
        Types type() const;
 
53
 
 
54
        /** get the message plugin guid */
 
55
        Guid guid() const;
 
56
 
 
57
        /** set the message plugin type */
 
58
        void setType( Types type );
 
59
 
 
60
        /** set the message plugin type from GUID */
 
61
        void setType( Guid guid );
 
62
 
 
63
        /** get the message plugin subtype */
 
64
        WORD subTypeId() const;
 
65
 
 
66
        /** set the message plugin subtype */
 
67
        void setSubTypeId( WORD subType );
 
68
 
 
69
        /** get the message plugin subtype text */
 
70
        QByteArray subTypeText() const;
 
71
 
 
72
        /** set the message plugin subtype text */
 
73
        void setSubTypeText( const QByteArray& text );
 
74
 
 
75
        /** get the message plugin data */
 
76
        QByteArray data() const;
 
77
 
 
78
        /** set the message plugin data */
 
79
        void setData( const QByteArray &data );
 
80
 
 
81
private:
 
82
        class MessagePluginPrivate;
 
83
        QSharedDataPointer<MessagePluginPrivate> d;
 
84
 
 
85
};
 
86
 
 
87
}
 
88
 
 
89
#endif