signalmessage.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-3.0-or-later OR BSD-3-Clause
2 /***************************************************************************
3  * Copyright (C) 2009,2010 by Rick L. Vinyard, Jr. *
4  * rvinyard@cs.nmsu.edu *
5  * *
6  * This file is part of the dbus-cxx library. *
7  ***************************************************************************/
8 #include <dbus-cxx/message.h>
9 #include <memory>
10 #include <string>
11 #include <vector>
12 #include "enums.h"
13 #include "path.h"
14 
15 #ifndef DBUSCXX_SIGNALMESSAGE_H
16 #define DBUSCXX_SIGNALMESSAGE_H
17 
18 namespace DBus {
19 
31 class SignalMessage : public Message {
32 protected:
33 
34  SignalMessage( );
35 
36  SignalMessage( const std::string& name );
37 
38  SignalMessage( const std::string& path, const std::string& interface_name, const std::string& name );
39 
40 public:
41  static std::shared_ptr<SignalMessage> create( );
42 
43  static std::shared_ptr<SignalMessage> create( const std::string& name );
44 
45  static std::shared_ptr<SignalMessage> create( const std::string& path, const std::string& interface_name, const std::string& name );
46 
47  bool set_path( const std::string& p );
48 
49  Path path() const;
50 
51  // bool has_path( const std::string& p ) const;
52 
53  std::vector<std::string> path_decomposed() const;
54 
55  bool set_interface( const std::string& i );
56 
57  std::string interface_name() const;
58 
59  //bool has_interface( const std::string& i ) const;
60 
61  bool set_member( const std::string& m );
62 
63  std::string member() const;
64 
65  //bool has_member( const std::string& m ) const;
66 
67  virtual MessageType type() const;
68 
69 };
70 
71 }
72 
73 #endif
This class represents a basic DBus message and also serves as a base class for the specialized messag...
Definition: message.h:43
Represents a DBus Path.
Definition: path.h:21
Represents a DBus signal message.
Definition: signalmessage.h:31
static std::shared_ptr< SignalMessage > create()
Definition: signalmessage.cpp:31
std::string interface_name() const
Definition: signalmessage.cpp:80
std::vector< std::string > path_decomposed() const
Definition: signalmessage.cpp:63
Path path() const
Definition: signalmessage.cpp:48
std::string member() const
Definition: signalmessage.cpp:95
SignalMessage()
Definition: signalmessage.cpp:15
bool set_interface(const std::string &i)
Definition: signalmessage.cpp:73
virtual MessageType type() const
Definition: signalmessage.cpp:106
bool set_path(const std::string &p)
Definition: signalmessage.cpp:43
bool set_member(const std::string &m)
Definition: signalmessage.cpp:90
Global DBus namespace, where everything happens.
Definition: callmessage.cpp:18
MessageType
Definition: enums.h:81