Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
biboumi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
louiz’
biboumi
Commits
8c26b4d1
Commit
8c26b4d1
authored
Oct 31, 2016
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused roster code
parent
056bc3da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
92 deletions
+0
-92
louloulibs/xmpp/roster.cpp
louloulibs/xmpp/roster.cpp
+0
-21
louloulibs/xmpp/roster.hpp
louloulibs/xmpp/roster.hpp
+0
-71
No files found.
louloulibs/xmpp/roster.cpp
deleted
100644 → 0
View file @
056bc3da
#include <xmpp/roster.hpp>
RosterItem
::
RosterItem
(
const
std
::
string
&
jid
,
const
std
::
string
&
name
,
std
::
vector
<
std
::
string
>&
groups
)
:
jid
(
jid
),
name
(
name
),
groups
(
groups
)
{
}
RosterItem
::
RosterItem
(
const
std
::
string
&
jid
,
const
std
::
string
&
name
)
:
jid
(
jid
),
name
(
name
),
groups
{}
{
}
void
Roster
::
clear
()
{
this
->
items
.
clear
();
}
louloulibs/xmpp/roster.hpp
deleted
100644 → 0
View file @
056bc3da
#pragma once
#include <algorithm>
#include <string>
#include <vector>
class
RosterItem
{
public:
RosterItem
(
const
std
::
string
&
jid
,
const
std
::
string
&
name
,
std
::
vector
<
std
::
string
>&
groups
);
RosterItem
(
const
std
::
string
&
jid
,
const
std
::
string
&
name
);
RosterItem
()
=
default
;
~
RosterItem
()
=
default
;
RosterItem
(
const
RosterItem
&
)
=
default
;
RosterItem
(
RosterItem
&&
)
=
default
;
RosterItem
&
operator
=
(
const
RosterItem
&
)
=
default
;
RosterItem
&
operator
=
(
RosterItem
&&
)
=
default
;
std
::
string
jid
;
std
::
string
name
;
std
::
vector
<
std
::
string
>
groups
;
private:
};
/**
* Keep track of the last known stat of a JID's roster
*/
class
Roster
{
public:
Roster
()
=
default
;
~
Roster
()
=
default
;
void
clear
();
template
<
typename
...
ArgsType
>
RosterItem
*
add_item
(
ArgsType
&&
...
args
)
{
this
->
items
.
emplace_back
(
std
::
forward
<
ArgsType
>
(
args
)...);
auto
it
=
this
->
items
.
end
()
-
1
;
return
&*
it
;
}
RosterItem
*
get_item
(
const
std
::
string
&
jid
)
{
auto
it
=
std
::
find_if
(
this
->
items
.
begin
(),
this
->
items
.
end
(),
[
this
,
&
jid
](
const
auto
&
item
)
{
return
item
.
jid
==
jid
;
});
if
(
it
!=
this
->
items
.
end
())
return
&*
it
;
return
nullptr
;
}
const
std
::
vector
<
RosterItem
>&
get_items
()
const
{
return
this
->
items
;
}
private:
std
::
vector
<
RosterItem
>
items
;
Roster
(
const
Roster
&
)
=
delete
;
Roster
(
Roster
&&
)
=
delete
;
Roster
&
operator
=
(
const
Roster
&
)
=
delete
;
Roster
&
operator
=
(
Roster
&&
)
=
delete
;
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment