Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f635e786
Kaydet (Commit)
f635e786
authored
Haz 15, 2013
tarafından
siqi
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
comManager works now
üst
b202d328
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
29 deletions
+32
-29
Client.m
ios/iosremote/iosremote/Communication/Client.m
+6
-5
CommandTransmitter.m
ios/iosremote/iosremote/Communication/CommandTransmitter.m
+1
-5
CommunicationManager.h
ios/iosremote/iosremote/Communication/CommunicationManager.h
+2
-0
CommunicationManager.m
ios/iosremote/iosremote/Communication/CommunicationManager.m
+3
-1
SlideShow.h
ios/iosremote/iosremote/Communication/SlideShow.h
+1
-1
SlideShow.m
ios/iosremote/iosremote/Communication/SlideShow.m
+2
-4
MainStoryboard_iPad.storyboard
...sremote/iosremote/en.lproj/MainStoryboard_iPad.storyboard
+1
-1
libreoffice_sdremoteViewController.m
ios/iosremote/iosremote/libreoffice_sdremoteViewController.m
+2
-0
slideShowViewController.m
ios/iosremote/iosremote/slideShowViewController.m
+14
-12
No files found.
ios/iosremote/iosremote/Communication/Client.m
Dosyayı görüntüle @
f635e786
...
...
@@ -96,6 +96,11 @@
[
self
.
outputStream
setDelegate
:
self
];
[
self
.
outputStream
scheduleInRunLoop
:[
NSRunLoop
currentRunLoop
]
forMode
:
NSDefaultRunLoopMode
];
[
self
.
outputStream
open
];
NSArray
*
temp
=
[[
NSArray
alloc
]
initWithObjects
:
@"LO_SERVER_CLIENT_PAIR
\n
"
,
self
.
name
,
@"
\n
"
,
self
.
pin
,
@"
\n\n
"
,
nil
];
NSString
*
command
=
[
temp
componentsJoinedByString
:
@""
];
[
self
sendCommand
:
command
];
}
}
...
...
@@ -114,18 +119,15 @@ int count = 0;
switch
(
eventCode
)
{
case
NSStreamEventOpenCompleted
:{
NSLog
(
@"Connection established"
);
self
.
connected
=
YES
;
if
(
count
==
1
)
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"connection.status.connected"
object
:
nil
];
}
else
{
count
++
;
}
}
}
break
;
case
NSStreamEventErrorOccurred
:{
NSLog
(
@"Connection error occured"
);
[
self
disconnect
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"connection.status.disconnected"
object
:
nil
];
}
break
;
...
...
@@ -153,7 +155,6 @@ int count = 0;
}
NSArray
*
commands
=
[
str
componentsSeparatedByString
:
@"
\n
"
];
[
self
.
receiver
parse
:
commands
];
data
=
nil
;
str
=
nil
;
...
...
ios/iosremote/iosremote/Communication/CommandTransmitter.m
Dosyayı görüntüle @
f635e786
...
...
@@ -24,11 +24,7 @@
{
self
=
[
self
init
];
self
.
client
=
client
;
NSArray
*
temp
=
[[
NSArray
alloc
]
initWithObjects
:
@"LO_SERVER_CLIENT_PAIR
\n
"
,
self
.
client
.
name
,
@"
\n
"
,
self
.
client
.
pin
,
@"
\n\n
"
,
nil
];
NSString
*
command
=
[
temp
componentsJoinedByString
:
@""
];
[
self
.
client
sendCommand
:
command
];
return
self
;
}
...
...
ios/iosremote/iosremote/Communication/CommunicationManager.h
Dosyayı görüntüle @
f635e786
...
...
@@ -12,6 +12,7 @@
@class
Client
;
@class
Server
;
@class
CommandInterpreter
;
@class
SlideShow
;
#define MSG_SLIDESHOW_STARTED @"SLIDESHOW_STARTED"
#define MSG_SLIDE_CHANGED @"SLIDE_CHANGED"
...
...
@@ -55,5 +56,6 @@ enum ConnectionState : NSInteger {
@property
ConnectionState
state
;
@property
(
nonatomic
,
strong
)
id
delegate
;
@property
(
nonatomic
,
strong
)
CommandInterpreter
*
interpreter
;
@end
ios/iosremote/iosremote/Communication/CommunicationManager.m
Dosyayı görüntüle @
f635e786
...
...
@@ -10,6 +10,7 @@
#import "CommunicationManager.h"
#import "Client.h"
#import "Server.h"
#import "SlideShow.h"
#import "CommandTransmitter.h"
#import "CommandInterpreter.h"
#import "libreoffice_sdremoteViewController.h"
...
...
@@ -18,7 +19,6 @@
@interface
CommunicationManager
()
@property
(
nonatomic
,
strong
)
Client
*
client
;
@property
(
nonatomic
,
strong
)
CommandInterpreter
*
interpreter
;
@property
(
nonatomic
,
strong
)
CommandTransmitter
*
transmitter
;
@property
(
atomic
,
strong
)
NSMutableSet
*
servers
;
@property
(
nonatomic
,
strong
)
id
connectionConnectedObserver
;
...
...
@@ -74,6 +74,7 @@
{
self
=
[
super
init
];
self
.
state
=
DISCONNECTED
;
self
.
interpreter
=
[[
CommandInterpreter
alloc
]
init
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
connectionStatusHandler
:
)
...
...
@@ -120,6 +121,7 @@
[
self
.
client
disconnect
];
// initialise it with a given server
self
.
client
=
[[
Client
alloc
]
initWithServer
:
server
managedBy
:
self
interpretedBy
:
self
.
interpreter
];
self
.
transmitter
=
[[
CommandTransmitter
alloc
]
initWithClient
:
self
.
client
];
[
self
.
client
connect
];
}
}
...
...
ios/iosremote/iosremote/Communication/SlideShow.h
Dosyayı görüntüle @
f635e786
...
...
@@ -15,7 +15,7 @@
@property
uint
size
;
@property
uint
currentSlide
;
@property
(
nonatomic
,
weak
)
id
delegate
;
@property
(
nonatomic
,
strong
)
id
delegate
;
-
(
void
)
putImage
:
(
NSString
*
)
img
AtIndex
:
(
uint
)
index
;
-
(
void
)
putNotes
:
(
NSString
*
)
notes
AtIndex
:
(
uint
)
index
;
...
...
ios/iosremote/iosremote/Communication/SlideShow.m
Dosyayı görüntüle @
f635e786
...
...
@@ -37,14 +37,12 @@
NSData
*
data
=
[
NSData
dataWithBase64String
:
img
];
UIImage
*
image
=
[
UIImage
imageWithData
:
data
];
[
self
.
imagesArray
insertObject
:
image
atIndex
:
index
];
slideShowViewController
*
vc
=
[
self
delegate
];
[[
vc
image
]
setImage
:
image
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"IMAGE_READY"
object
:
nil
];
}
-
(
void
)
putNotes
:
(
NSString
*
)
notes
AtIndex
:
(
uint
)
index
{
[
self
.
notesArray
insertObject
:
notes
atIndex
:
index
];
slideShowViewController
*
vc
=
[
self
delegate
];
[[
vc
lecturer_notes
]
loadHTMLString
:
notes
baseURL
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"NOTE_READY"
object
:
nil
];
}
-
(
UIImage
*
)
getImageAtIndex
:
(
uint
)
index
...
...
ios/iosremote/iosremote/en.lproj/MainStoryboard_iPad.storyboard
Dosyayı görüntüle @
f635e786
...
...
@@ -12,7 +12,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"64"
width=
"768"
height=
"960"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
text=
"192.168.
40.101
"
borderStyle=
"roundedRect"
minimumFontSize=
"17"
id=
"9w1-Ym-HcF"
>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
text=
"192.168.
0.22
"
borderStyle=
"roundedRect"
minimumFontSize=
"17"
id=
"9w1-Ym-HcF"
>
<rect
key=
"frame"
x=
"234"
y=
"402"
width=
"301"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
...
...
ios/iosremote/iosremote/libreoffice_sdremoteViewController.m
Dosyayı görüntüle @
f635e786
...
...
@@ -11,6 +11,7 @@
#import "Server.h"
#import "slideShowViewController.h"
#import "CommunicationManager.h"
#import "CommandInterpreter.h"
@interface
libreoffice_sdremoteViewController
()
...
...
@@ -46,6 +47,7 @@
-
(
void
)
prepareForSegue
:
(
UIStoryboardSegue
*
)
segue
sender
:
(
id
)
sender
{
if
([
segue
.
identifier
isEqualToString
:
@"slidesPreviewSegue"
])
{
slideShowViewController
*
destViewController
=
segue
.
destinationViewController
;
destViewController
.
slideshow
=
[
self
.
comManager
.
interpreter
slideShow
];
[
destViewController
.
slideshow
setDelegate
:
destViewController
];
}
}
...
...
ios/iosremote/iosremote/slideShowViewController.m
Dosyayı görüntüle @
f635e786
...
...
@@ -32,20 +32,22 @@
{
[
super
viewDidLoad
];
//
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
//
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
NSNotificationCenter
*
center
=
[
NSNotificationCenter
defaultCenter
];
NSOperationQueue
*
mainQueue
=
[
NSOperationQueue
mainQueue
];
// [self.image setImage:[self.slideshow getImageAtIndex:0]];
// [self.lecturer_notes loadHTMLString: [self.slideshow getNotesAtIndex:0]baseURL:nil];
// self.slideShowImageReadyObserver = [center addObserverForName:@"IMAGE_READY" object:nil
// queue:mainQueue usingBlock:^(NSNotification *note) {
// NSLog(@"Getting image to display: %@", [self.slideshow getImageAtIndex:0]);
// [self.image setImage:[self.slideshow getImageAtIndex:0]];
// }];
// self.slideShowNoteReadyObserver = [center addObserverForName:@"NOTE_READY" object:nil
// queue:mainQueue usingBlock:^(NSNotification *note) {
// NSLog(@"Getting note to display: %@", [self.slideshow getNotesAtIndex:0]);
// [self.lecturer_notes loadHTMLString: [self.slideshow getNotesAtIndex:0]baseURL:nil];
// }]
self
.
slideShowImageReadyObserver
=
[
center
addObserverForName
:
@"IMAGE_READY"
object
:
nil
queue
:
mainQueue
usingBlock
:^
(
NSNotification
*
note
)
{
if
([
self
.
slideshow
size
]
==
0
)
NSLog
(
@"Oups"
);
NSLog
(
@"Getting image to display: %@"
,
[
self
.
slideshow
getImageAtIndex
:
0
]);
[
self
.
image
setImage
:[
self
.
slideshow
getImageAtIndex
:
0
]];
}];
self
.
slideShowNoteReadyObserver
=
[
center
addObserverForName
:
@"NOTE_READY"
object
:
nil
queue
:
mainQueue
usingBlock
:^
(
NSNotification
*
note
)
{
NSLog
(
@"Getting note to display: %@"
,
[
self
.
slideshow
getNotesAtIndex
:
0
]);
[
self
.
lecturer_notes
loadHTMLString
:
[
self
.
slideshow
getNotesAtIndex
:
0
]
baseURL
:
nil
];
}];
}
...
...
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