Nicolas Jager | 58c70b0 | 2016-08-26 09:50:45 -0400 | [diff] [blame] | 1 | #pragma once
|
| 2 | /**************************************************************************
|
| 3 | * Copyright (C) 2016 by Savoir-faire Linux *
|
| 4 | * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
|
| 5 | * Author: Traczyk Andreas <traczyk.andreas@savoirfairelinux.com> *
|
| 6 | * *
|
| 7 | * This program is free software; you can redistribute it and/or modify *
|
| 8 | * it under the terms of the GNU General Public License as published by *
|
| 9 | * the Free Software Foundation; either version 3 of the License, or *
|
| 10 | * (at your option) any later version. *
|
| 11 | * *
|
| 12 | * This program is distributed in the hope that it will be useful, *
|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
| 15 | * GNU General Public License for more details. *
|
| 16 | * *
|
| 17 | * You should have received a copy of the GNU General Public License *
|
| 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
| 19 | **************************************************************************/
|
| 20 | using namespace Platform;
|
| 21 | using namespace Windows::UI::Xaml::Data;
|
| 22 |
|
| 23 | namespace RingClientUWP
|
| 24 | {
|
| 25 | public ref class ConversationMessage sealed
|
| 26 | {
|
| 27 | public:
|
| 28 | property String^ Date;
|
| 29 | property bool FromContact;
|
| 30 | property String^ Payload;
|
| 31 | };
|
| 32 |
|
| 33 | public ref class Conversation sealed
|
| 34 | {
|
| 35 | private:
|
| 36 |
|
| 37 |
|
| 38 | public:
|
Nicolas Jager | 93abfea | 2016-08-30 12:33:07 -0400 | [diff] [blame^] | 39 | /* functions */
|
Nicolas Jager | 58c70b0 | 2016-08-26 09:50:45 -0400 | [diff] [blame] | 40 | Conversation();
|
| 41 | void addMessage(String^ date, bool fromContact, String^ payload);
|
| 42 |
|
Nicolas Jager | 93abfea | 2016-08-30 12:33:07 -0400 | [diff] [blame^] | 43 | internal:
|
| 44 | /* properties */
|
| 45 | property Vector<ConversationMessage^>^ _messages
|
| 46 | {
|
| 47 | Vector<ConversationMessage^>^ get()
|
| 48 | {
|
| 49 | return messagesList_;
|
| 50 | }
|
| 51 | }
|
| 52 |
|
Nicolas Jager | 58c70b0 | 2016-08-26 09:50:45 -0400 | [diff] [blame] | 53 | private:
|
Nicolas Jager | 93abfea | 2016-08-30 12:33:07 -0400 | [diff] [blame^] | 54 | /* members */
|
| 55 | Vector<ConversationMessage^>^ messagesList_;
|
Nicolas Jager | 58c70b0 | 2016-08-26 09:50:45 -0400 | [diff] [blame] | 56 |
|
| 57 | };
|
| 58 | #define MSG_FROM_CONTACT true
|
| 59 | #define MSG_FROM_ME false
|
| 60 | }
|
| 61 |
|