You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
182 lines
3.7 KiB
182 lines
3.7 KiB
/* |
|
* Spreed WebRTC. |
|
* Copyright (C) 2013-2014 struktur AG |
|
* |
|
* This file is part of Spreed WebRTC. |
|
* |
|
* This program is free software: you can redistribute it and/or modify |
|
* it under the terms of the GNU Affero General Public License as published by |
|
* the Free Software Foundation, either version 3 of the License, or |
|
* (at your option) any later version. |
|
* |
|
* This program 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 Affero General Public License for more details. |
|
* |
|
* You should have received a copy of the GNU Affero General Public License |
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
* |
|
*/ |
|
|
|
package main |
|
|
|
type DataHello struct { |
|
Version string |
|
Ua string |
|
Id string |
|
} |
|
|
|
type DataOffer struct { |
|
Type string |
|
To string |
|
Offer interface{} |
|
} |
|
|
|
type DataCandidate struct { |
|
Type string |
|
To string |
|
Candidate interface{} |
|
} |
|
|
|
type DataAnswer struct { |
|
Type string |
|
To string |
|
Answer interface{} |
|
} |
|
|
|
type DataSelf struct { |
|
Type string |
|
Id string |
|
Sid string |
|
Userid string |
|
Suserid string |
|
Token string |
|
Version string |
|
Turn *DataTurn |
|
Stun []string |
|
} |
|
|
|
type DataTurn struct { |
|
Username string `json:"username"` |
|
Password string `json:"password"` |
|
Ttl int `json:"ttl"` |
|
Urls []string `json:"urls"` |
|
} |
|
|
|
type DataSession struct { |
|
Type string |
|
Id string |
|
Userid string `json:"Userid,omitempty"` |
|
Ua string `json:"Ua,omitempty"` |
|
Token string `json:"Token,omitempty"` |
|
Version string `json:"Version,omitempty"` |
|
Rev uint64 `json:"Rev,omitempty"` |
|
Status interface{} |
|
} |
|
|
|
type DataUser struct { |
|
Id string |
|
Sessions int |
|
} |
|
|
|
type DataBye struct { |
|
Type string |
|
To string |
|
Bye interface{} |
|
} |
|
|
|
type DataStatus struct { |
|
Type string |
|
Status interface{} |
|
} |
|
|
|
type DataChat struct { |
|
To string |
|
Type string |
|
Chat *DataChatMessage |
|
} |
|
|
|
type DataChatMessage struct { |
|
Message string |
|
Time string |
|
NoEcho bool `json:",omitempty"` |
|
Mid string `json:",omitempty"` |
|
Status *DataChatStatus |
|
} |
|
|
|
type DataChatStatus struct { |
|
Typing string `json:",omitempty"` |
|
State string `json:",omitempty"` |
|
Mid string `json:",omitempty"` |
|
SeenMids []string `json:",omitempty"` |
|
FileInfo *DataFileInfo `json:",omitempty"` |
|
ContactRequest *DataContactRequest `json:",omitempty"` |
|
AutoCall *DataAutoCall `json:",omitempty"` |
|
} |
|
|
|
type DataFileInfo struct { |
|
Id string `json:"id"` |
|
Chunks uint64 `json:"chunks"` |
|
Name string `json:"name"` |
|
Size uint64 `json:"size"` |
|
Type string `json:"type"` |
|
} |
|
|
|
type DataContactRequest struct { |
|
Id string |
|
Success bool |
|
Userid string `json:",omitempty"` |
|
Token string `json:",omitempty"` |
|
} |
|
|
|
type DataAutoCall struct { |
|
Id string |
|
Type string |
|
} |
|
|
|
type DataIncoming struct { |
|
Type string |
|
Hello *DataHello |
|
Offer *DataOffer |
|
Candidate *DataCandidate |
|
Answer *DataAnswer |
|
Bye *DataBye |
|
Status *DataStatus |
|
Chat *DataChat |
|
Conference *DataConference |
|
Alive *DataAlive |
|
Authentication *DataAuthentication |
|
Sessions *DataSessions |
|
} |
|
|
|
type DataOutgoing struct { |
|
Data interface{} |
|
From string |
|
To string |
|
} |
|
|
|
type DataSessions struct { |
|
Type string |
|
Users []*DataSession |
|
Id string `json:",omitempty"` |
|
Token string `json:",omitempty"` |
|
Index uint64 `json:",omitempty"` |
|
Batch uint64 `json:",omitempty"` |
|
} |
|
|
|
type DataConference struct { |
|
Id string |
|
Type string |
|
Conference []string |
|
} |
|
|
|
type DataAlive struct { |
|
Type string |
|
Alive uint64 |
|
} |
|
|
|
type DataAuthentication struct { |
|
Type string |
|
Authentication *SessionToken |
|
}
|
|
|