Skip to content

Commit

Permalink
Finished work on channel streams
Browse files Browse the repository at this point in the history
  • Loading branch information
wizard7377 authored and wizard7377 committed Aug 11, 2023
1 parent c31745d commit 04d493e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
3 changes: 1 addition & 2 deletions include/dpp/channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@
#include <dpp/json_fwd.h>
#include <dpp/permissions.h>
#include <dpp/json_interface.h>

#include <unordered_map>

#include <variant>
#include <string>

namespace dpp {

class channel_stream; //Forward declaration
/** @brief Flag integers as received from and sent to discord */
enum channel_type : uint8_t {
CHANNEL_TEXT = 0, //!< a text channel within a server
Expand Down
3 changes: 2 additions & 1 deletion include/dpp/dpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <map>

#include <functional>
#include <dpp/streams.h>

#include <dpp/exception.h>
#include <dpp/snowflake.h>
#include <dpp/misc-enum.h>
Expand Down Expand Up @@ -65,6 +65,7 @@
#include <dpp/discordclient.h>
#include <dpp/dispatcher.h>
#include <dpp/cluster.h>
#include <dpp/streams.h>
#include <dpp/cache.h>
#include <dpp/httpsclient.h>
#include <dpp/queues.h>
Expand Down
5 changes: 4 additions & 1 deletion include/dpp/streams.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@


namespace dpp {

/**
* @brief Return end of message
* @return 0
*/
int end_msg();
/**
* @brief Simple parent for streams
Expand Down
7 changes: 3 additions & 4 deletions include/dpp/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@
#include <dpp/snowflake.h>
#include <dpp/managed.h>
#include <dpp/utility.h>

#include <dpp/json_interface.h>

namespace dpp {

class cluster; //TODO Find a way to remove this forward declaration
class dm_stream; //Forward declaration
/**
* @brief Various bitmask flags used to represent information about a dpp::user
*/
Expand Down Expand Up @@ -109,7 +108,7 @@ class DPP_EXPORT user : public managed, public json_interface<user> {
* @param bot The bot that will send the message
* @return The stream object used to send messages
*/
//dm_stream stream(cluster& bot);
dm_stream stream(cluster& bot);
/**
* @brief Construct a new user object
*/
Expand Down
1 change: 1 addition & 0 deletions src/dpp/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
************************************************************************************/
#include <dpp/channel.h>
#include <dpp/streams.h>
#include <dpp/cache.h>
#include <dpp/guild.h>
#include <dpp/user.h>
Expand Down
6 changes: 4 additions & 2 deletions src/dpp/user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
*
************************************************************************************/
#include <dpp/user.h>
#include <dpp/cluster.h>
#include <dpp/streams.h>
#include <dpp/discordevents.h>
#include <dpp/json.h>
#include <dpp/stringops.h>
Expand Down Expand Up @@ -292,11 +294,11 @@ void from_json(const nlohmann::json& j, user& u) {
}
}
}
/*

dm_stream user::stream(cluster& bot) {
return dm_stream(bot,*this);
}
*/



} // namespace dpp

0 comments on commit 04d493e

Please sign in to comment.