summaryrefslogtreecommitdiff
path: root/include/contentDirectory.h
blob: 92544a0045fc24abcd4bf390d2ec6a973b314769 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * contentDirectory.h
 *
 *  Created on: 27.08.2012
 *      Author: savop
 */

#ifndef CONTENTDIRECTORY_H_
#define CONTENTDIRECTORY_H_

#include "../include/service.h"
#include "../include/tools.h"
#include <vdr/thread.h>

namespace upnp {

class cContentDirectory : public cUPnPService, public cThread {
public:

  /**
   * Constructor of a Connection manager
   *
   * This creates an instance of a <em>Connection Manager Service</em> and provides
   * interfaces for executing actions and subscribing on events.
   */
  cContentDirectory();
  virtual ~cContentDirectory();
  /*! @copydoc cUpnpService::subscribe(Upnp_Subscription_Request* Request) */
  virtual int Subscribe(Upnp_Subscription_Request* request);
  /*! @copydoc cUpnpService::execute(Upnp_Action_Request* Request) */
  virtual int Execute(Upnp_Action_Request* request);
  /*! @copydoc cUpnpService::setError(Upnp_Action_Request* Request, int Error) */
  virtual void SetError(Upnp_Action_Request* request, int error);

  virtual void Init(cMediaServer* server, UpnpDevice_Handle deviceHandle);
  virtual void Stop();
private:
  int GetSearchCapabilities(Upnp_Action_Request* Request);
  int GetSortCapabilities(Upnp_Action_Request* Request);
  int GetSystemUpdateID(Upnp_Action_Request* Request);
  int Browse(Upnp_Action_Request* Request);
  int Search(Upnp_Action_Request* Request);
  int CreateObject(Upnp_Action_Request* Request);
  int DestroyObject(Upnp_Action_Request* Request);
  int UpdateObject(Upnp_Action_Request* Request);
  int DeleteResource(Upnp_Action_Request* Request);
  int CreateReference(Upnp_Action_Request* Request);
  int StopTransferResource(Upnp_Action_Request* Request);
  int GetTransferProgress(Upnp_Action_Request* Request);
  int ExportResource(Upnp_Action_Request* Request);
  int ImportResource(Upnp_Action_Request* Request);

  void Action();

} ContentDirectory;

}  // namespace upnp

#endif /* CONTENTDIRECTORY_H_ */