usb_ecm: Use the current configuration instead of a fixed one.
[haiku.git] / src / servers / app / ServerPicture.h
blobd44d2a52829915cc453fe3aef032e5dddc52e833
1 /*
2 * Copyright 2001-2015, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * DarkWyrm <bpmagic@columbus.rr.com>
7 * Stefano Ceccherini <stefano.ceccherini@gmail.com>
8 * Julian Harnath <julian.harnath@rwth-aachen.de>
9 */
10 #ifndef SERVER_PICTURE_H
11 #define SERVER_PICTURE_H
14 #include <DataIO.h>
16 #include <ObjectList.h>
17 #include <PictureDataWriter.h>
18 #include <Referenceable.h>
21 class BFile;
22 class Canvas;
23 class ServerApp;
24 class View;
26 namespace BPrivate {
27 class LinkReceiver;
28 class PortLink;
30 class BList;
33 class ServerPicture : public BReferenceable, public PictureDataWriter {
34 public:
35 ServerPicture();
36 ServerPicture(const ServerPicture& other);
37 ServerPicture(const char* fileName,
38 int32 offset);
39 virtual ~ServerPicture();
41 int32 Token() { return fToken; }
42 bool SetOwner(ServerApp* owner);
43 ServerApp* Owner() const { return fOwner; }
45 bool ReleaseClientReference();
47 void EnterStateChange();
48 void ExitStateChange();
50 void SyncState(View* view);
51 void SetFontFromLink(BPrivate::LinkReceiver& link);
53 void Play(Canvas* target);
55 void PushPicture(ServerPicture* picture);
56 ServerPicture* PopPicture();
58 void AppendPicture(ServerPicture* picture);
59 bool NestPicture(ServerPicture* picture);
61 off_t DataLength() const;
63 status_t ImportData(BPrivate::LinkReceiver& link);
64 status_t ExportData(BPrivate::PortLink& link);
66 private:
67 friend class PictureBoundingBoxPlayer;
69 typedef BObjectList<ServerPicture> PictureList;
71 int32 fToken;
72 BFile* fFile;
73 BPositionIO* fData;
74 PictureList* fPictures;
75 ServerPicture* fPushed;
76 ServerApp* fOwner;
80 #endif // SERVER_PICTURE_H